Making a Trigger available at a certain moment ?


(dwe_flame) #1

what i want to do is make something like this:
you have a Obj A, Obj B, and a Obj C.
what i want to to is, make the Trigger for Obj C available, only when A and B are destroyed.

Obj C here can be some door/teleporter/ so on.

i i was thinking maybe to do something with globalaccume on A and B
and when C is 2, it is active.

is this possible ? and how to you make a trigger non-working at start and make it active when A and B are done ?


(IndyJones) #2

im not a scripter… but if its possible to make certain brushes appear after something is blowed up, it’s gotta be possible thtat way also.


(dwe_flame) #3

mm yea that you can do with the func_static and start invisible.
but i wonder if that can be set on a trigger brush too… mm lets try that :smiley:


(Pegazus) #4

Yes it’s possible. Though not being a scripting god (like Sage or Wezelkrozum or Chr1s). What I would do is use a dummy model for the objective and when certain objectives are done you activate it via script and replace the dummy model with the real deal. That would work if your objective is a model though i believe.


(-SSF-Sage) #5

Trigger not working at start:

game_manager’s spawn:

setstate mytrigger invisible   //mytrigger is targetname
accum 0 set 0  //Reset for safety... 

To activate the stuff when 2 objs are blown:

Add into game_manager:


trigger obj_counter
{
accum 0 inc 1
accum 0 abort_if_less_than 2

setstate mytrigger default   //this allows to use the trigger again
}

ObjA and ObjB:

death
{
trigger game_manager obj_counter
}

This method works for pretty much anything, teleports, triggers, gamemodels etc. etc.

Edit. And don’t forget to rename accum 0 if you already have it in use in game_manager. :smiley:


(dwe_flame) #6

works :smiley:
thanx


(-SSF-Sage) #7

You are welcome. :wink:


(nUllSkillZ) #8

Some entites can’t be activated/deactivated with “setstate”.
You should try “alertentity” in these cases.