tankproblem, setBrigde,clearBridge and enable/disablestage


(jew.white widow) #1

the first construction for the tank to pass is a barriere and the second a bridge
when i make my bridge and then the tank, the tank will stop at the barriere
axis has to blow the bridge so the allieds can move the tank to the bridge
setbridge and clearbridge is acting like a enablestage2(first barriere)

when i replace the bridge with a second barriere, then they are working perfect
i can use enablestage2 and enablestage4 then
but the brigde gives some trouble

trigger stuck_check
{
accum 1 bitreset 3
trigger self stuck_check_barrier1_built
trigger self stuck_check_bridge_built
trigger self stuck_check_bridge_dyna
trigger self stuck_check_scriptlockout
trigger self stuck_check_finished
}

trigger stuck_check_finished
{
	accum 3 abort_if_less_than 31
	accum 1 bitset 3
}

trigger stuck_check_scriptlockout
{
	accum 5 abort_if_equal 0
	accum 1 bitset 3
}

trigger stuck_check_bridge_built
{
	accum 3 abort_if_not_equal 18
	accum 1 abort_if_bitset 0
	accum 1 bitset 3
}

trigger stuck_check_bridge_dyna
{
	accum 3 abort_if_not_equal 18
	accum 9 set_to_dynamitecount tankbrug
	accum 9 abort_if_equal 0
	accum 1 bitset 3
}

trigger stuck_check_barrier1_built
{
	accum 3 abort_if_not_equal 6
	accum 1 abort_if_not_bitset 0
	accum 1 bitset 3
}

trigger stuck_check_barrier1_built_msg
{
	accum 1 abort_if_not_bitset 0
	wm_teamvoiceannounce 1 "goldrush_allies_tankbar_destroy"
}

defense1 --> barriere1
{
spawn
{
wait 400
trigger defense1 setup
constructible_class 3
}

trigger setup
{
	setstate defense1_materials default
	setstate defense1_materials_clip default
	setstate defense1_flag default
	setstate defense1_teeth invisible
}

buildstart final
{	
	setstate defense1_materials default
	setstate defense1_materials_clip default
	setstate defense1_flag default
	setstate defense1_teeth underconstruction
}

built final
{
	setstate defense1_materials invisible
	setstate defense1_materials_clip invisible
	setstate defense1_flag invisible
	setstate defense1_teeth default
	trigger tank disable_stage2
	wm_announce "tank barriere #1 has been constructed."

}

decayed final
{
	setstate defense1_materials default
	setstate defense1_materials_clip default
	setstate defense1_flag default
	setstate defense1_teeth invisible
}

death
{
	setstate defense1_materials default
	setstate defense1_materials_clip default
	setstate defense1_flag default
	setstate defense1_teeth invisible
	trigger tank enable_stage2
	wm_announce "Tank Barrier #1 has been destroyed."
	
}

trigger remove
{
	setstate defense1_toi invisible
	setstate defense1_materials invisible
	setstate defense1_materials_clip invisible
	setstate defense1_flag invisible
	setstate defense1_teeth invisible

	remove
}

}

tankbrug -->bridge
{
spawn
{
accum 7 set 0 //brugconstructie en tankstatus
wait 200
trigger tankbrug setup
constructible_class 3
accum 7 bitset 1 //tank nog niet over brug
}

trigger setup
{
	setstate tankbrug invisible
	

buildstart final
{
	setstate tankbrug underconstruction
	
}

built final
{
	setstate tankbrug default
	wm_announce  "Bridge has been constructed"
	trigger tank setBridge
	//trigger tank enable_stage4
	accum 7 abort_if_not_bitset 1 // tank over bridge?
}

decayed final
{
	setstate tankbrug invisible	
}

death
{
	setstate tankbrug invisible
	//trigger tank disable_stage 4
	trigger tank clearBridge
	wm_announce  "Bridge has been destroyed"
	accum 7 abort_if_not_bitset 1 //tank over bridge?
}

trigger tank_passed
{
		accum 7 bitreset 1 //tank over de brug
}

}

trigger run_6
{
trigger self tracks_forward
accum 1 bitset 2
followspline 0 spln8 50 wait length 32
accum 1 bitreset 2
trigger tank stuck_check_barrier1_built_msg
trigger self run_continue
}
trigger run_18
{
trigger self tracks_forward
accum 1 bitset 2
followspline 0 spln20 50 wait length 32
accum 1 bitreset 2
//trigger tank stuck_check_barrier2_built_msg
trigger tankbrug tank_passed
trigger self run_continue
}


(EB) #2

I have re-read the post several times and it confuses me.

HUH ?
-Can you .zip the map portions along with the script file and post a download link ? Also, can you explain the situation better ?
Maybe then we can make some progress on this.


(jew.white widow) #3

if i start the game and i construct only the bridge, no barriere
the tank will stop at the barriere
i have to blow the bridge or construct the barriere(then blowing the barriere for the tank to pass)
then the tank stops at the bridge(when constructed)
i have to blow the bridge and construct here again to pass
http://users.pandora.be/pajocoons/widow/map.zip


(EB) #4

You have some odd errors and accums that you think are supposed to work…well, they call nothing. I apologize but I do not want to spend an hour deciphering what you have changed to find a fix.
You’ll need to rebuild your script…Ifurita has a nice tutorial on Scripting

  • I tried to re-create the problem as you have explained and the tank never proceeded.

(jew.white widow) #5

thx
found my problem
everything works perfect