Touch triggering a script.


(bloodwire) #1

I have a tiny problem which I’ve been searching on these forums and otherwhere, but I haven’t really found a solution, it might just be that I’m just dumb too. This is what I want:

When allies enters a certain area (marked by a brush, assumed to be “trigger” brush) - I want a script to run/to be triggered.

Now, the scripting isn’t a problem, calling it is. I don’t want allies to have to touch a special button or anything, I just want it so that one of the allies players has to be at that exact spot where the trigger brush is.

I’ve tried using trigger_objective_info and some of the other entities, but it simply does not want to work. Has anyone done this, any pointers? or alternative solutions?


(Ifurita) #2

Search for Patrol Points by Gerbil. He has some good scripts + prefabs to do what you’re looking for. You’ll need a couple of entities like a trigger multiple, timer, relay, etc


(Shaderman) #3

Short form: trigger_objective_info --> target_script_trigger --> script execution

The tank on goldrush has what you want :wink:


(WeeBull) #4

i’d make a trigger_multiple instead of a trigger_objective_info, i don’t know if it’s much different, but i think that’s what ifurita ment


(codejockey13) #5

point a trigger_multiple (with the allied_only spawnflag set) to a target_script_trigger. execute the scriptname key in the target_script_trigger in your script.


(Loffy) #6

Agree.
And the trigger_multiple can have the key ‘wait’ with the value ‘30’, or whatever.
This will make it 30 seconds between each triggering. Works perfect if you have, for example, an alarm that sounds for 25 seconds.


(here) #7

how to make doors
I need to remake the portal of mp_assault
How to make this script_mover properly with an invisible_user


(here) #8

how to link a func_invisible user to the script ?