Need to easify an insane Function
The Title of this Thread was "All about Entities...".
The Problem was solved, but I got a new Problem and did not want to create a new Thread. See Post #42 for the new Problem. Between below here and Post #42 is the Stuff from the previous Problem... Okay, I need to know how: - Execute a public function when an entity is triggered and get the ent-id. - Then read the entities classname. - Then read keys with their values from the entity. - Then find entities by targetname (NOT classname) and trigger them. Thanks in advance! |
Re: All about Entities...
Did you tried http://www.amxmodx.org/funcwiki.php ?
1. FM_Spawn? 2. pev(ent, pev_classname, ...)? 3. key value data or pev (for the last see #2)? 4. engfunc(EngFunc_FindEntityByString, -1, "targetname", "my_targetname")? |
Re: All about Entities...
FM_Spawn is called when entitiy spawns, not when it is triggered. :/
EDIT: btw I was thinking of a Plugin which allows you to have new entities. For example amx_trigger_countdown where you have a key value for time and all those for how and where the hudmessage shall appear and what shall be triggered if time is up but abort the countdown if the entity is triggered again. With your words I sadly cannot create more than this: Code:
|
Re: All about Entities...
Quote:
|
Re: All about Entities...
My bad!
But how do I call a Function when an entity is triggered and get the ent-id then? If there is no way I had to totally rebuild the Maps Entity System which I do not want to do. |
Re: All about Entities...
triggered == used. I can't remember now whether this valid for all triggers or not, but for example: on de_vertigo when you falling you touch invisible trigger that trigger (use) ambient_generic entity that emit sound.
(i'm not mean actual "+use" command but game engine's pfnUse). But here is the problem: FM_Use is never called. It's not a bug (search for more info in this issue if interested). EDIT: It may be that i messed the "triggered entity" term. I assumed that it is the trigger entity that is triggered the other entity (not the other entity that is triggered the trigger). |
Re: All about Entities...
Lets say a Map contains a trigger_auto.
5 Seconds after Map Start it triggers an Entity. That is the moment in which my Plugin shall find out everything about the triggered/targeted Entity. And if there seriously is no easy Function included in AMXModX which is called when an Entity is triggered then I will fall off my chair, because Entites are goddamn important. EDIT: I also need to know how to read spawnflags! |
Re: All about Entities...
variable = pev(ent, pev_spawnflags) ?
|
Re: All about Entities...
Thanks, but my idea seems to be impossible since it is said Entity Triggering
cannot be hooked to a Function. Makes me sad! :( I even started making Sprites for 3D View in VHE. |
Re: All about Entities...
I got an idea, but there is no function to find an entid by target. @_@
I tried http://www.amxmodx.org/funcwiki.php?go=func&id=346 but you cannot define a target to search for in there (should be fixed/finished maybe) |
| All times are GMT -4. The time now is 04:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.