script_mover question


(_Muzzle_) #1

Hi guys i’m back with a small question:

I got a gate that is a script_mover which is triggered by a soldier if he steps onto some platform and the gate stays open forever. But if the soldier leaves the platform the gate continues moving. How can I make my gate so that if he leaves the platform the gate returns to it’s normal state ?? I used a trigger_once for the platform

I got the script from drakir’s northpole map and changed it a bit.

my little script

// =================================================================
// ===========================Soldier Gate==========================
// =================================================================

gate_trigger
{
	spawn
	{
	}

	trigger gate_move
	{
	trigger soldiergate1 move
	}

}

soldiergate1
{
	spawn
		{
		accum 1 set 0
		}

	trigger move
		{
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		gotomarker soldieropen 80 wait
		wait 5000
		}
}

I think I have to use a trigger return but how?? :???:


(mrfin) #2

hello Muzzle

Now then I’m pretty ropey at all of this business but might you need another line in your script after your 5000 wait that will be gotomarker - whatever its starting point was.

Also shouldn’t you use a trigger multiple for things to trigger more than once?

May well be wrong - be warned :slight_smile:


(Malverik) #3

what happens is that you only tell the gate to go to the full open position. What you need is more markers, at each markers you check if someone is on the plate, if so, you move to the next marker, if not you move to the previous marker
And for the last marker, you dont do anything since you want it open forever


(Malverik) #4

oh, here’s a tought:
There is a gate similar to what you want to do on the transmitter map (website n0lame.de) maybe you can ask someone on their forum how they did it!


(_Muzzle_) #5

@mrfin thx for the trigger°multiple, I knew i forgot something

@Malverik, yup that’s what I want, I’l see if I can get it to work :clap:


(Shaderman) #6

A curve made of several splines, smoothed by info_train_spline_controls should work when triggered by a trigger_multiple. The gate would move from spline to spline while a player is in the trigger.


(_Muzzle_) #7

i can’t get it to work :angry:
Shaderman i started learning scripting from tutorials a few days ago so if somebody could explain how that works or direct me to a tutorial that would be great :bored: :frowning:

Edit: Nevermind guys, I changed it a bit so I can create it myself with my weak scripting skills :banana: :banana: