mini game: shooting range


(murka) #1

i was making a shooting range while my brain got stuck on a simple thing. i triggered a button that makes accum 2 set 1 and next thing in script accum 2 abort_if_not_equal 1 and it like understood as the accum 2 was set to something else than 1. i cant understand wtf is wrong.
i added some wm_announces to understad where the problem is in the scripty.


	trigger starter
	{
		accum 1 abort_if_equal 1
		accum 1 set 1
		gotomarker down 5 wait
		gotomarker up 5 wait
		accum 1 set 0
		accum 2 abort_if_equal 1
		trigger self start_shooting
		accum 2 set 1
		accum 2 abort_if_not_equal 1
		wm_announce "accum 2 set to 1"
	}

	trigger status_checker
	{
		wm_announce "starting check..."
		accum 2 abort_if_not_equal 1
		wm_announce "check started"

this is a partial code. when im in game i get wm_announces accum 2 set 1 and starting check. i dont get the message check started. but it should be coming as the accumulator 2 IS 1. so any help?


(nUllSkillZ) #2

Where do you set accum 2 to 1?
From where is trigger “status_checker” called?

Accums are only valid in one entity scriptpart.
If you want to change an accum in another scriptpart you have to use a globalaccum.

You should post all the scriptparts where you use accum 2.


(murka) #3

o sry i was in a hurry. iv kinda fixed the problem but ET wont allow me to make a line like

thingy
{
spawn
{
trigger self 1
trigger self 2
}
}

the second trigger wont work