AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook the specific target being triggered without registering all entities? (https://forums.alliedmods.net/showthread.php?t=242086)

Rirre 06-13-2014 16:31

Hook the specific target being triggered without registering all entities?
 
Instead of using register_touch, Ham_Use...and so on.
Is there any way to detect if the specific target has been triggered? Only once per triggered targetname?
Examples:
Code:

"origin" "0 0 0"
"target" "spawn"
"classname" "trigger_once"

Code:

"origin" "0 0 0"
"target" "spawn"
"classname" "trigger_multiple"

Code:

"origin" "0 0 0"
"spawn" "0"
"classname" "multi_manager"

Here I want to detect if "spawn" has been triggered. Just once. Without registering all these entities within plugin_init with a global bool which each registered entity check if it already have been set to true or false.
Or is it just possible creating a new entity, for e.g. func_button with targetname "spawn" and hook it from there with Ham_Use?

EDIT: Posted into the wrong forum, it was supposed to be located in "Scripting help".


All times are GMT -4. The time now is 21:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.