Castle gate


(FrostyChilli) #1

Hey people !

I am new on these forums and also pretty new in mapping. I’ve made couple of smaller maps for my own fun and learned the basics. Now i am asking your help.

In an awsome map called Transmitter there is an awsome gate, which has this rotating lever(?). Axis Castle backdoor. I’ve checked the script, i understand what command does what, but i don’t know how are entities, brushes, triggers etc. connected in radiant. So if anyone could spend their time and tell me how its done, i’d be glad.

Thank you !


(Zer0Cool) #2
// ================================================
// ================= BACKGATE =====================
// ================================================

backdoor_activator
{
	trigger movedoor
	{
		trigger backdoor open
	}
}

backdoor_stopper
{
	trigger stopcheck
	{
		trigger backdoor stopcheck
	}
}
backgate_dummy
{
	spawn
	{
		wait 50
		constructible_class	3
		setstate backgate_dest invisible
		globalaccum 2 set 0
	}

	death
	{
		globalaccum 2 set 1
		setstate backgate_dummy invisible
		alertentity backgate_explosion			// Boom^^fx
		togglespeaker backgate_explosion		// Boom
		trigger backdoor putt
		trigger backgate_turnwheel stop
		trigger backgate_bigwheels stop

		setstate backgate_floor invisible
		setstate backgate_dest default

		wm_announce "^1Backgate destroyed!"
	}
}
backdoor
{
	spawn
	{
		wait 50
		accum 1 set 1
		accum 3 set 0
		accum 4 set 0
	}

	trigger open
	{
		globalaccum 2 abort_if_equal 1
		accum 3 set 0
		accum 2 abort_if_equal 1

		trigger backgate_turnwheel start
		trigger backgate_bigwheels start
		accum 1 trigger_if_equal 1 backdoor up1
		accum 1 trigger_if_equal 2 backdoor up2
		accum 1 trigger_if_equal 3 backdoor up3
		accum 1 trigger_if_equal 4 backdoor up4
		accum 1 trigger_if_equal 5 backdoor up5
		accum 1 trigger_if_equal 6 backdoor up6
		accum 1 trigger_if_equal 7 backdoor up7
		accum 1 trigger_if_equal 8 backdoor up8
		accum 1 trigger_if_equal 9 backdoor up9
		accum 1 abort_if_less_than 10
		trigger backgate_turnwheel stop
		trigger backgate_bigwheels stop
		stopsound
	}

	trigger up1
	{
		accum 2 set 1
		playsound sound/movers/doors/door6_open.wav volume 127
		playsound sound/movers/doors/door6_loopo.wav looping volume 512
		gotomarker backdoor_pos1 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger up2
	{
		accum 2 set 1
		gotomarker backdoor_pos2 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger up3
	{
		accum 2 set 1
		gotomarker backdoor_pos3 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger up4
	{
		accum 2 set 1
		gotomarker backdoor_pos4 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger up5
	{
		accum 2 set 1
		gotomarker backdoor_pos5 8 wait
		accum 1 inc 1
		accum 2 set 0
	}
	trigger up6

	{
		accum 2 set 1
		gotomarker backdoor_pos6 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger up7
	{
		accum 2 set 1
		gotomarker backdoor_pos7 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger up8
	{
		accum 2 set 1
		gotomarker backdoor_pos8 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger up9
	{
		accum 2 set 1
		gotomarker backdoor_pos9 8 wait
		accum 1 inc 1
		accum 2 set 0
	}

	trigger down
	{
		globalaccum 2 abort_if_equal 1
		accum 2 set 1
		playsound sound/movers/doors/door6_loopc.wav looping volume 512
		trigger backgate_turnwheel rev
		trigger backgate_bigwheels rev
		gotomarker backdoor_pos0 100 wait

		trigger backgate_turnwheel stop
		trigger backgate_bigwheels stop
		stopsound
		playsound sound/movers/doors/door6_endc.wav volume 256

		accum 1 set 1
		accum 2 set 0
	}

	trigger stopcheck
	{
		globalaccum 2 abort_if_equal 1
		accum 1 abort_if_equal 1
		accum 3 inc 1
		accum 3 abort_if_less_than 2
		trigger backdoor down
	}
	trigger putt
	{
		// abortmove
		gotomarker backdoor_pos0 10000 wait
		setstate backdoor invisible
	}
}

backgate_turnwheel
{
	trigger start
	{
		globalaccum 2 abort_if_equal 1
		setrotation 0 0 -100
	}

	trigger rev
	{
		globalaccum 2 abort_if_equal 1
		setrotation 0 0 300
	}

	trigger stop
	{
		stoprotation
	}
}

backgate_bigwheels
{
	trigger start
	{
		globalaccum 2 abort_if_equal 1
		setrotation 0 0 -10
	}

	trigger rev
	{
		globalaccum 2 abort_if_equal 1
		setrotation 0 0 100
	}

	trigger stop
	{
		stoprotation
	}
}

// ================================================
// =============== BACKGATE END ===================
// ================================================

seems to be like this:

backdoor_activator is a trigger_multiple which is targeted to a target_script_trigger

backdoor_stopper is a func_timer which is targeted to another target_script_trigger

backgate_dummy is a func_constructible

backdoor is a script_mover moving along the backdoor_pos1-backdoor_pos9 which probably are path_corners

backgate_turnwheel and backgate_bigwheels should be script_movers too


(FrostyChilli) #3

Thanks for the reply !

I’ll see if i can get it working. If i can’t, i’ll just come back.

Thank you !


(FrostyChilli) #4

Hey again !

I think it is better to continue in this thread than making a new one. I got another question.
How can i make a kill limit system. Like…which team gets 500 kills first, wins. Like in Battlefield with tickets.

Thank you !


(Qualmi) #5

[QUOTE=FrostyChilli;209192]Hey again !

I think it is better to continue in this thread than making a new one. I got another question.
How can i make a kill limit system. Like…which team gets 500 kills first, wins. Like in Battlefield with tickets.

Thank you ![/QUOTE]

with accums in the mapscript. there is a deathmatch prefab somewhere her in this forum, i think not more then 20 threads, 1 week ago. read it, learn it. => inc an accum when ever one man dies. do branching like

accum 0 trigger_if_equal 500 <routine> <subroutine> 

(Zer0Cool) #6

you can’t count kills, just spawns:
http://splashdamage.com/forums/showthread.php?p=206217#post206217


(stealth6) #7

prefab here:
http://splashdamage.com/forums/showthread.php?t=20256


(FrostyChilli) #8

Thank you for quick reply !

I am really starting to like this place.

Anyways, now i’ll try to get it workign and again thank you !