Accum trigger_if_equal


(GloXz) #1

I’m trying to make some sort of score board depending on how much objectives have been captured:


game_manager
{
	spawn
	{
	}
}

alliesdocs
{
	trigger captured
	{
		wm_announce "Axis docs captured"
		trigger axiscounter add
	}
}

axiscounter
{
	spawn
	{
		wait 50
		setstate axis_1_0 default
		setstate axis_1_1 invisible
		setstate axis_1_2 invisible
		setstate axis_1_3 invisible
		setstate axis_1_4 invisible
		setstate axis_1_5 invisible
		setstate axis_1_6 invisible
		setstate axis_1_7 invisible
		setstate axis_1_8 invisible
		setstate axis_1_9 invisible
		setstate axis_2_0 default
		setstate axis_2_1 invisible
		setstate axis_2_2 invisible
		setstate axis_2_3 invisible
		setstate axis_2_4 invisible
		setstate axis_2_5 invisible
		setstate axis_2_6 invisible
		setstate axis_2_7 invisible
		setstate axis_2_8 invisible
		setstate axis_2_9 invisible
		accum 1 set 0
		accum 2 set 0
	}
	
	trigger add
	{
		trigger self addaccum
		trigger self addcounter
	}

	trigger addaccum
	{
		accum 1 inc 1
		accum 1 abort_if_not_equal 10
		accum 2 inc 1
		accum 1 set 0
	}

	trigger addcounter
	{
		setstate axis_1_0 default
		setstate axis_1_1 invisible
		setstate axis_1_2 invisible
		setstate axis_1_3 invisible
		setstate axis_1_4 invisible
		setstate axis_1_5 invisible
		setstate axis_1_6 invisible
		setstate axis_1_7 invisible
		setstate axis_1_8 invisible
		setstate axis_1_9 invisible
		setstate axis_2_0 default
		setstate axis_2_1 invisible
		setstate axis_2_2 invisible
		setstate axis_2_3 invisible
		setstate axis_2_4 invisible
		setstate axis_2_5 invisible
		setstate axis_2_6 invisible
		setstate axis_2_7 invisible
		setstate axis_2_8 invisible
		setstate axis_2_9 invisible
		accum 1 trigger_if_equal 1 self check11
		accum 1 trigger_if_equal 2 self check12
		accum 1 trigger_if_equal 3 self check13
		accum 1 trigger_if_equal 4 self check14
		accum 1 trigger_if_equal 5 self check15
		accum 1 trigger_if_equal 6 self check16
		accum 1 trigger_if_equal 7 self check17
		accum 1 trigger_if_equal 8 self check18
		accum 1 trigger_if_equal 9 self check19
		accum 2 trigger_if_equal 1 self check21
		accum 2 trigger_if_equal 2 self check22
		accum 2 trigger_if_equal 3 self check23
		accum 2 trigger_if_equal 4 self check24
		accum 2 trigger_if_equal 5 self check25
		accum 2 trigger_if_equal 6 self check26
		accum 2 trigger_if_equal 7 self check27
		accum 2 trigger_if_equal 8 self check28
		accum 2 trigger_if_equal 9 self check29
	}

	trigger check11
	{
		setstate axis_1_1 default
	}

...

	trigger check19
	{
		setstate axis_1_9 default
	}

	trigger check21
	{
		setstate axis_2_1 default
	}

...

	trigger check29
	{
		setstate axis_2_9 default
	}
}

Howover, the accum <n> trigger_if_equal … is not working … When I add a line (setstate axis_2_1 default for example) to the addcounter it works.
Does anyone see what I’m doing wrong ?


(ThompZen) #2

i can’t get my accums to work eighter :frowning:


(Drakir) #3

Check this thread out!
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=6357&highlight=ctf


(GloXz) #4

I’m sorry, but what has that to do with this script ?


(Drakir) #5

It´s basicly the same issues discussed there. For all i can see in your script its a kind of CTF map your working on. Loffy is working on a map with the same stuff and has already made a scoreboard for that map. So by redirecting you to that thread u could share the problems and work. I never said it would solve your problem with the script.