Thread: [Solved] Entity real name
View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-14-2019 , 10:18   Re: Entity real name
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
Such as func_breakable ?

That is a class name if he named the class name to something different it may not even function it wouldn't be an entity just an object.
No. Each entity can be assigned a name in VHE.

It should indeed be targetname. Take a look at this BaseBuilder mod - https://forums.alliedmods.net/showthread.php?t=144287
It uses entities named "barrier" to do stuff.

PHP Code:
g_iEntBarrier find_ent_by_tname( -1"barrier" ); 
And entities named "ignore" for other things. Here the guy got the name like this:

PHP Code:
new szClass[10], szTarget[7];
entity_get_string(entEV_SZ_classnameszClass9);
entity_get_string(entEV_SZ_targetnameszTarget6);
if (!
equal(szClass"func_wall") || equal(szTarget"ignore"))
    return 
PLUGIN_HANDLED
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom