triggers, movers and tst's!


(LaggingTom) #1

Well, they seem to get along. To a point.

I have a trigger_multiple that triggers a target_script_trigger

I’m sure of the triggering occuring because the debug in the console says it does.

But, apparently the script_movers don’t like the command.

gate_up_1
{
	spawn
	{
		wait 200
		gotomarker pth_up_1_up 5000 wait
		accum 0 set 1
	}
	
	trigger down
	{
		accum 0 abort_if_equal 0
		accum 0 set 0
		gotomarker pth_up_1_dn 5000 wait
//		trigger self up
	}
	
	trigger up
	{
		gotomarker pth_up_1_up 25 wait
		accum 0 set 1
	}
}

I’ve commented the up part for a bit, but in the spawn, when I switch the _up tag at the end to the _dn tag (my other path_corner) it starts on the bottom, as it should.

The problem is, when it triggers, the gate (when starting at pth_up_1_up) doesn’t drop down. Any suggestions?


(Malverik) #2

does your script_trigger as the scriptname “gate_up_1” and the target “down”?

other than that im not familiar with gotomarker, i find that followspline does the trick just fine!


(LaggingTom) #3

Script triggered the movement, but the movement didn’t happen.

Tried with spline points, also, didn’t make it through, though it did get triggered in the script.

New script:

gate_up_1
{
	spawn
	{
		wait 200
		followspline 1 spln10 5000 wait
		faceangles 0 0 0 1
		accum 0 set 1
	}
	
	trigger down
	{
//		accum 0 abort_if_equal 0
//		accum 0 set 0
		followspline 0 spln10 25 wait
//		trigger self up
	}
	
	trigger up
	{
		followspline 1 spln10 25 wait
		accum 0 set 1
	}
}

Also, here’s what the console says when I pass through the trigger_multiple:

7600 : (n/a) GScript event: activate 
7600 : (gate_up_1) GScript event: trigger down
7600 : (gate_up_1) GScript command: followspline 0 spln10 25 wait

Does it matter that I’m trying to move the script mover (a patch) through another patch?


(LaggingTom) #4

Not to sound desperate… but I am :stuck_out_tongue:

:bump:


(Loffy) #5

Sorry, I cannot see whats wrong.
You have an origin-brush for the script_mover?
// Loffy


(LaggingTom) #6

Yes I do.


(lispider) #7

Here is the working solution I came up with


gate
{	
	trigger down
	{
	accum 1 abort_if_greater_than 50
	accum 1 inc 1
	gotomarker p1 600 wait
	trigger gate down
	}
	trigger up
	{
	accum 1 abort_if_greater_than 80
	accum 1 inc 1
	wait 100
	gotomarker p2 200 wait
	trigger gate up
	}
}

Using 2 trigger_multiple’s and 2 target_script_trigger’s by simply changing either the wait or accums u can change the delay that they are locked in :slight_smile:

Prolly not the best way but it works to do exactly what you are looking for


(Malverik) #8

but you never reset your accum! its gonna go down and up once and stay up

also why do you need call 50 times the same trigger? once its already at p1, that code will execute as fast as the server can handle it


(lispider) #9

then use a global accum and have it reset via another trigger and simply bump the wait period up, and yes both will run as fast as the server can handle but the up will be wait times how many more cycles it runs through then the other one :slight_smile: either way it works and I said its not the best solution but it works


(LaggingTom) #10

So just trigger the gotomarker more than once?


(lispider) #11

basically I just have them both looping fighting eachother until the up outlasts it

and to answer ur question yes more than once

send me an aim if u want also, I have it saved and in working order if you are still having problems :slight_smile:


(Malverik) #12

if this is what is causing the problem, did you try putting something like “wait 100” right before the gotomarker in your original script?


(lispider) #13

if u put a wiat on the goto it renders the trap useless


(MadMaximus) #14

aight… maybe im drunk… actually i am…
but what is it you want to do exactly…
let me know, and i’ll respond.

EDIT:
in laymans terms… i may be loaded, but i can do script movers that will turn your head… what do you want to do exactly…


(LaggingTom) #15

It’s a gate, when someone passes the trigger_multiple, the gate should drop through a patch and trap whoever is in the area.


(MadMaximus) #16

if i get the jist of it… lets say a room with only one entrance… if you enter the room a gate will drop that closes the room off?


(LaggingTom) #17

Pretty much. Someone passes through a tunnel, the trigger is in the middle of the tunnel, a gate drops down to seal off the tunnel and the floor rises to crush


(MadMaximus) #18

well jebus… whats to difficult about that???

thats like that level in rtcw… simple as pie…

but…

is there a way for the player to get out??
or is he destined to die?


(MadMaximus) #19

if you want a gate that shuts down, no problem… you want it to raise again after a given time, use a target delay that targets a target_script_trigger…

almost seems like that level on q3…

but it’s easy as pie to do…


(LaggingTom) #20

The problem is, it doesn’t go THROUGH the patch of the tunnel. And the player is doomed, yes :smiley: