Scripts / Entity ID

Author
Message
dimoxinil
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location:
Posted: 8th Sep 2018 16:19
Hello,

I know that you can get entity ID now by just hovering over the entity in the editor and it shows the ID in the status bar.

Is there any way to know the entity id (not the entity object number) of any dynamic object into your game level, just using a Lua script ?

in this link talk about it.. but the linlks are broken.

Thanks for your time.



AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th Sep 2018 16:20
e
Been there, done that, got all the T-Shirts!
PM
dimoxinil
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location:
Posted: 8th Sep 2018 16:22 Edited at: 8th Sep 2018 16:28
wait!!!

it is as simple as that..

I feel incredibly stupid..

alright.. just a little more than the usual.

Thanks AmenMoses.


smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Sep 2018 17:07
happens to us all
but yes 'e' is the entity ID
and
g_Entity[e]['obj'] is the AI object number (used for some of the AI commands).

i just spent 30mins trying to work out how to play an animation in unity because the docs say Play("string = animation name") but really it required the index - i.e. Play(0)... good documentation is hard to come by
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2024-12-22 21:00:34
Your offset time is: 2024-12-22 21:00:34