For any feature requests to either the Skyline Engine or the websites and forums please leave your suggestion here.

getEntityFromBody(bodyID)

getEntityFromBody(bodyID)

Postby ant0N » 22 Aug 2015, 13:09

it seems that we have no such command? :)
I need to know the tag of the object:
Code: Select all
function onSensorContact_Stay( testTable )
    for k,v in ipairs( testTable ) do
        getObject?
     end
end
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: getEntityFromBody(bodyID)

Postby StarFire » 22 Aug 2015, 15:38

Yes you can get the object ID from the returned table. Here is a snippet from my AI Sensor:

Code: Select all
function onSensorContact_Stay( testTable )
   if(playerKO==1)then return; end
   for k,sensor_objectID in ipairs( testTable ) do
      prayID = sensor_objectID
   end
end


Hope this helps ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: getEntityFromBody(bodyID)

Postby ant0N » 22 Aug 2015, 15:47

Oh, sorry... :oops: :oops: I originally misunderstood.. I see Now, thanks!
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: getEntityFromBody(bodyID)

Postby StarFire » 22 Aug 2015, 16:12

np pleased we could help :D
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests