trigger_multiple


(masterkiller) #1

Hello,

Is it possible to activate a script when a player leaves a trigger_multiple?
I made lots of tests today and nothing has worked …

In short, a player enters the trigger in activating (no problem here), but when the player leaves the trigger, it activates something else?


(Zer0Cool) #2

could you mayby post your solution?


(masterkiller) #3

i edit to fast sorry… not working well.

If i found it i will post it Zer0Cool :wink: .


(Qualmi) #4

im currently too busy, so i didnt try yet, but what i could imagine is drawing two trigger multiples, one inner multiple and one outer. then you could swtich states with accums and activate event. think you still have to write the script very well.

edit: ah forget it. wont work with more than one player. one could still sit in the center and the other could actiavte the outer circle.


(masterkiller) #5

Yah it will not work. It for a 1 on 1 map and when no player in the trigger, the door open for another player.

It more like a vehicule script_mover trigger i try to build… .(ex:truck) When a player was in the trigger, truck moving. when no player in, truck stop…

I will try to do a script timeout… Will see if i can make this work :stuck_out_tongue:

Any suggestion are welcome! :wink:


(-SSF-Sage) #6

Just copy the system from truck/tank. If you can’t extract the neccesery stuff, I’ll help you out.


(masterkiller) #7

yah, you right {SSF}Sage.

This is what i does after posting and it look pretty good like this.
But now im tire i will try to finish it tomorow

look like this but i need to work the deathcheck to call only 1 time.
( i hate accum stuff :D)


tank_disabler
{
	trigger run
	{
		trigger tank_trigger tank_disable
	}
}

tank_enabler
{
	trigger run
	{
		trigger tank_trigger tank_enable
	}
}



tank_trigger
{
	spawn
	{

	}


	// ========================================
	// movement

	trigger move_check
	{
		trigger tank_trigger stuck_check
		accum 1 abort_if_bitset 3

		trigger tank_trigger dispatch
	}

	trigger move
	{
		trigger tank_trigger move_check

		wait 500

		trigger tank_trigger move
	}

	// ========================================
	// ========================================


	trigger run_continue
	{
//		trigger tank_trigger deathcheck
		trigger tank_trigger stopcheck
		trigger tank_trigger move
	}


	trigger dispatch
	{
		accum 1 bitset 2
		wm_announce "activate dispatch!"
		accum 1 bitreset 2
		trigger tank_trigger stopcheck

//		accum 3 set 1

//		trigger tank_trigger run_continue
	}

	// ========================================
	trigger stuck_check
	{
		accum 1 bitreset 3

		trigger tank_trigger stuck_check_scriptlockout
	}

	trigger stuck_check_scriptlockout
	{
		accum 1 abort_if_not_bitset 4

		accum 1 bitset 3
	}



	// ========================================
	// ========================================




	// ========================================
	// stop check

	trigger stopcheck_setup
	{
		accum 1 bitset 6				// stop if we're stuck/no-one's pushing :)

		accum 1 abort_if_bitset 8		// no one in the trigger, abort

		trigger tank_trigger stuck_check		// call the stop check function
		accum 1 abort_if_bitset 3		// we're stuck so break out

		accum 1 bitreset 6				// we're free to keep going
	}

	trigger stopcheck
	{
		trigger tank_trigger stopcheck_setup
		accum 1 abort_if_not_bitset 6

		trigger tank_trigger script_lockout

		trigger tank_trigger script_lockout_stop
		resetscript
	}

	// ========================================
	// ========================================




	// ========================================
	// script lockouts

	trigger script_lockout
	{
		accum 1 bitset 4
	}

	trigger script_lockout_stop
	{
		accum 1 bitreset 4
	}

	// ========================================
	// ========================================


	// ========================================
	// enable/disable

	trigger tank_enable
	{
		trigger tank_trigger stuck_check
		accum 1 abort_if_bitset 3 	// stuck check

		accum 4 set 0				// reset stop counter
		accum 1 bitreset 8			// reset stop check

		accum 1 abort_if_bitset 2 	// already following spline
		accum 1 abort_if_bitset 4 	// script lockout

		accum 1 abort_if_bitset 7 	// death check

		trigger tank_trigger move
	}

	trigger tank_disable
	{
		accum 4 inc 1				// up the stop counter
		accum 4 abort_if_less_than 2

		accum 1 bitset 8			// set stop check
		wm_announce "disable!"

//		trigger tank_trigger deathcheck

//		resetscript
	}

	// ========================================
	// ========================================

	trigger deathcheck
	{
		accum 1 bitset 7
		accum 1 abort_if_not_bitset 7	// are we dead?
		accum 1 abort_if_bitset 9		// are we not already visibly dead?
		accum 1 abort_if_bitset 2		// are we not following a spline?
		accum 1 abort_if_bitset 4		// are we not in a script lockout?

		accum 1 bitset 9				// we're now visibly dead

		wm_announce "kill!"

      	resetscript
	}
}


(Zer0Cool) #8

here is a “was the triggerzone left?”-map, stolen/copied from the chocojump-map

http://www.file-upload.net/download-2162794/left.pk3.html


(masterkiller) #9

This is exactly what I wanted!
A big THANK Zer0Cool and chocojump mapper . :slight_smile: