AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Triggers in map to code (https://forums.alliedmods.net/showthread.php?t=22219)

Sandurr 12-21-2005 12:59

Triggers in map to code
 
Is it possible that, when for example, in the map, a trigger gets activated, you can use its target that is activated in the code?

For example

A trigger has as target: open

when someone walks tru it, public open() or something is trigger? something like that possible ? lol

Brad 12-21-2005 13:04

Moved to from "Support / Help".

DarlD 12-21-2005 15:22

We will have to test it now wont we :)

EDIT: tested with Target as the action for a code, doesnt work

i repeat... this doesnt work

XxAvalanchexX 12-21-2005 19:59

Code:
public plugin_init() {     register_touch("*","player","player_touch");  }  public player_touch(ent,player) {     if(!is_valid_ent(ent)) return PLUGIN_CONTINUE;     new target[32];     entity_get_string(ent,EV_SZ_target,target,31);     if(equali(target,"open")) {         open();     }     return PLUGIN_CONTINUE;  }  public open() {  }


All times are GMT -4. The time now is 15:46.

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