Scripts / [SOLVED] Getting entity name from outside script

Author
Message
Jnick
8
Years of Service
User Offline
Joined: 10th Feb 2016
Location: U.S.A.
Posted: 23rd Jul 2020 23:48
After a lot of checking it looks like the only way to get an entity name is by running a script on the entity with the _init_name(e,name).

Is there any way to be running a script from a barrel or other entity and get the name from a different entity.

The author of this post has marked a post as an answer.

Go to answer
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 24th Jul 2020 00:30
This post has been marked by the post author as the answer.
Try GetEntityName(e)

ie:

Prompt("Hi " ..GetEntityName(e))
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Jnick
8
Years of Service
User Offline
Joined: 10th Feb 2016
Location: U.S.A.
Posted: 24th Jul 2020 01:20
Repaceing the enty id at the 'e' works,. Thanks
PM

Login to post a reply

Server time is: 2024-03-29 09:18:39
Your offset time is: 2024-03-29 09:18:39