is ET stupit


(murka) #1

k i made a map with a rocket launcher that shoots when an allied player is in a trigger_multiple
the problem is… i set my accum 5 to 1 in spawn, every 1 sec it gives itself some ammo, but when i added accum 5 abort_if_equal 0 before it, it just wont give ammo, so i did scriptdebug and saw that accum 5 was 0, ??? like wtf. so i changed the abort to 1, accum is 0 and it still wont go through the abort.
the basic idea is that if the rocket launcher is destroyed it wont reload or shoot, and when repaired it shoots etc.
do i have to reinstall ET?


(RayBan) #2

maybe post the script fisrt, it may be something simple.


(murka) #3
rocket_launcher
{
	spawn
	{
		wait 200
		setstate rocket1 invisible
		setstate rocket2 invisible
		setstate rocket3 invisible
		setstate rocket4 invisible
		accum 0 set 0		//nr of rockets in
		wait 100
		accum 5 set 1
	}

	death
	{
		wait 500
		wm_announce "^7The automatic rocket launcher has been damaged!"
		wait 100
		kill rocketlauncher_repair
		wait 100
		accum 5 set 0
		printaccum 5
	}

	rebirth
	{
		wm_announce "^7The automatic rocket launcher has been repaired!"
		wait 100
		accum 5 set 1
	}

	trigger giveammo
	{
		printaccum 5
		wait 5
		printaccum 5
		accum 5 abort_if_equal 0
		accum 2 abort_if_equal 0
		accum 1 abort_if_bitset 1
		trigger self give1
		trigger self give2
		trigger self give3
		trigger self give4
	}

	trigger give1
	{
		accum 1 abort_if_bitset 1
		accum 0 abort_if_not_equal 0
		wait 200
		trigger self lock
		wait 10
		setstate rocket1 underconstruction
		wait 1000
		setstate rocket1 default
		accum 0 set 1
		trigger self lock_end
	}

	trigger give2
	{
		accum 1 abort_if_bitset 1
		accum 0 abort_if_not_equal 1
		wait 210
		trigger self lock
		wait 20
		setstate rocket2 underconstruction
		wait 1000
		setstate rocket2 default
		accum 0 set 2
		trigger self lock_end
	}

	trigger give3
	{
		accum 1 abort_if_bitset 1
		accum 0 abort_if_not_equal 2
		wait 220
		trigger self lock
		wait 30
		setstate rocket3 underconstruction
		wait 1000
		setstate rocket3 default
		accum 0 set 3
		trigger self lock_end
	}

	trigger give4
	{
		accum 1 abort_if_bitset 1
		accum 0 abort_if_not_equal 3
		wait 230
		trigger self lock
		wait 40
		setstate rocket4 underconstruction
		wait 1000
		setstate rocket4 default
		accum 0 set 4
		trigger self lock_end
	}

	trigger shoot1
	{
		accum 0 abort_if_not_equal 1
		wait 10
		accum 1 abort_if_bitset 1
		trigger self lock
		wait 200
		alertentity rocketlauncher1
		setstate rocket1 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		accum 0 set 0
		trigger self lock_end
	}

	trigger shoot2
	{
		accum 0 abort_if_not_equal 2
		wait 20
		accum 1 abort_if_bitset 1
		trigger self lock
		wait 250
		alertentity rocketlauncher1
		setstate rocket1 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		wait 100
		alertentity rocketlauncher2
		setstate rocket2 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		accum 0 set 0
		trigger self lock_end
	}

	trigger shoot3
	{
		accum 0 abort_if_not_equal 3
		wait 30
		accum 1 abort_if_bitset 1
		trigger self lock
		wait 250
		alertentity rocketlauncher1
		setstate rocket1 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		wait 100
		alertentity rocketlauncher2
		setstate rocket2 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		wait 100
		alertentity rocketlauncher3
		setstate rocket3 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		accum 0 set 0
		trigger self lock_end
	}


	trigger shoot4
	{
		accum 0 abort_if_not_equal 4
		wait 40
		accum 1 abort_if_bitset 1
		trigger self lock
		wait 250
		alertentity rocketlauncher1
		setstate rocket1 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		wait 100
		alertentity rocketlauncher2
		setstate rocket2 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		wait 100
		alertentity rocketlauncher3
		setstate rocket3 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		wait 100
		alertentity rocketlauncher4
		setstate rocket4 invisible
		alertentity rocketsmoke
		wait 50
		alertentity rocketsmoke
		accum 0 set 0
		trigger self lock_end
	}

	trigger lock
	{
		accum 1 bitset 1
	}

	trigger lock_end
	{
		accum 1 bitreset 1
	}

	trigger shoot
	{
		accum 5 abort_if_equal 0
		accum 1 abort_if_bitset 1
		trigger rocket_launcher shoot1
		trigger rocket_launcher shoot2
		trigger rocket_launcher shoot3
		trigger rocket_launcher shoot4
	}
}

teh scripty, tell me if u find anything


(C) #4

In Your trigger giveammo there is some check on accum 2.
But i see no initialization code for accum 2 in any code part of rocket_launcher…so therefore i think the value of accum 2 is still 0.
accum 2 abort_if_equal 0…

   trigger giveammo 
   { 
      printaccum 5 
      wait 5 
      printaccum 5 
      accum 5 abort_if_equal 0 
      accum 2 abort_if_equal 0 // <-- aborting on this line
      accum 1 abort_if_bitset 1 
      trigger self give1 
      trigger self give2 
      trigger self give3 
      trigger self give4 
   } 

(d3coy) #5

i agree… thats the only thing i see as well.


(murka) #6

yeh well i had accum 2 as it before, but still it wont fix the problem that the accum 5 is set to 1 and in game i get that its 0, explain that


(murka) #7

k i used globalaccum, omfg now everything is mad. it just wont read abort_if_not_equal
:? :? :? :?
im trying to fix its or sth, seems that ET has something seriously wrong.
ill put my rocket launcher back to normal without being constructible. i really wanted it to be constructible tho, maybe if i make it differently

edit: i had a script_mover with health that is the same scriptname as the rocketlauncher, maybe it collided sth and made a big mess, some kind of a bug.
now everything is fixed, just put them in seperate scriptnames


(murka) #8

k if anybody wants this rocket launcher. i made a prefab
link:here


(Darkfrost) #9

Can’t we just awnser your question?

Yes, ET is very stupit.

And i like eggs. Snorts eggs