Jump to content

One Way Triggers


Recommended Posts

You can probably fake it using multiple triggers that (de)activate each other... Like have 3, one that activates the middle one when you approach it from the correct side and one that deactivates it when you approach from the other one (using a target_activate/target_deactivate).

therfiles likes this
Link to comment

That's quite a bit of figuring to get it to work. My testchamber is down a corridor (dead end). When the player walked back out then I wanted stormtoopers to run into the control room and attack. I think I'll keep it simple and just have one of the NPC's at the end of the cutscene walk into a trigger with a long delay.

 

I was just curious if it could be done since I never saw it anywhere.

Link to comment

Hmm, I can imagine the mission where you defuse bombs would have many cases of de/-activated triggers, if you need reference. How about just place one target_activate in the dead end, and connect it to the trigger which then runs next time the player goes back?

Link to comment

Can't you use the "angles" key to set an angle a player must be facing to activate a trigger?

Of course, I imagine that would mean if they ran backward through it it would work in the opposite direction.

Yeah, I thought of this and didn't mention it due to the running backwards thing. Not a reasonable solution. I still stand by the "just use a target_activate" thing.
Link to comment

Mmm... the more fast soluction is a trigger Once. setted as inactive with the spawnflag. when player go inside the room, hurt a second trigger this can:

1: with a usescript or a target scriptrunner acrivate by the second trigger, activate a script that use the target_activate connected to deactivated trigger.

2: connect the second trigger to the target activate connected to the first trigger for enable it.

 

however, i suggest to use icarus script. give more controls.

i think it's better a trigger_once, if you not wnat a cycle looping event.

so:

 

- Hallway with trigger deactivate.

- End of Hallway  with trigger that activate the deactivate frist trigger.

- script of stormtrooper spawn and behavours.

Link to comment

It should be entirely possible to code something similar but you'd definitely run into that issue as mentioned above.

 

We had a forcefield entity in Q3 Fortress/ETF which allowed for 1 direction pass throughs fine so long as you were looking in the correct angles.

 

It might also be hard to have prediction work correctly on said triggers.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...