Scripts / Get an entity name in script

Author
Message
Nathan38
13
Years of Service
User Offline
Joined: 13th Feb 2011
Location:
Posted: 5th Mar 2018 17:30
Hi all,
quick question is it possible to get an entities name from a script it is running

if I edit an entities properties and set its name to "barrel" lets say, can I then get that in data the script somehow?

Thanks!
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Mar 2018 19:12 Edited at: 5th Mar 2018 19:13
Yes, use the _init_name function instead of the plain _init version.

For example:
Been there, done that, got all the T-Shirts!
PM
Nathan38
13
Years of Service
User Offline
Joined: 13th Feb 2011
Location:
Posted: 5th Mar 2018 22:29
Thanks Amen!

Your example helped me put together my most recent post!

Login to post a reply

Server time is: 2024-04-26 18:38:53
Your offset time is: 2024-04-26 18:38:53