hi all i have try to make a moving raft in brush i have problem he don’t want move and he don’t want repair
my entitys is
my brush (raft) is script mover + origin brush
classname script-mover
health 2000
description the escape raft
targetname RAFT
scriptname RAFT
spawnflags I have to notch solid compass explisivedamageonly resurectable + allied
the trigger_objectiv_info
spawnflags tank+ allied
customaxisimage target of my custom cm picture
customalliesimagecible target of my custom cm picture
target RAFT_construct
track the RAFT
scriptname RAFT_build
targetname RAFT_build
shortname RAFT
classname trigger_objective_info
triger_multiple is
trigger multiple
spawnflags allied
target RAFT_enabler
scriptname RAFT_trigger
targetname RAFT_trigger
classname trigger_multiple
target_script_trigger
classname target_script_trigger
scriptname RAFT_enabler
targetname RAFT_enabler
target run
func_timer
classname func_timer
target RAFT_disabler
spawnflags 1 start_on
wait 1
2nd target_script_trigger
classname target_script_trigger
targetname RAFT_disabler
scriptname RAFT_disabler
target run
target kill
classname target_kill
targetname kill_boat
target RAFT_construct
clip+origin construtible
classname func_constructible
scriptname RAFT_construct
targetname RAFT_construct
spawnflags startbuild+ allied
and my script
RAFT_sound
{
trigger start
{
trigger RAFT sound_start
wait 2000
trigger RAFT sound_move
}
trigger stop
{
trigger RAFT sound_stop
wait 3000
trigger RAFT sound_idle
}
trigger rebirth
{
trigger RAFT sound_rebirth
wait 1000
trigger RAFT sound_idle
}
}
// digibob: converting truck script from goldrush over…
// ============================================================================
// accum 0, track state
// accum 1
// - bit 0: barrier1 state ( 0 = not built, 1 = built )
// - bit 1: barrier2 state ( 0 = not built, 1 = built )
// - bit 2: spline status ( 0 = not moving, 1 = moving )
// - bit 3: stuck check flag ( 0 = not stuck, 1 = stuck )
// - bit 4: flag for message ( 0 = dont display, 1= display )
// - bit 5: blank ( )
// - bit 6: temp register (XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
// - bit 7: death status ( 0 = alive, 1 = dead )
// - bit 8: player check ( 0 = players, 1 = no players )
// - bit 9: visible state ( 0 = alive, 1 = dead )
// accum 2, blank
// accum 3, current movement loop position
// accum 4, stop counter
// accum 5, lockout ref counter
// accum 6, blank
// accum 7, blank
// ===========================================================================================
// spline points are spln2 -> spln78
// ===========================================================================================
// track events:
// - tracks_forward
// - tracks_stop
// - tracks_turn_left
// - tracks_turn_right
RAFT
{
spawn
{
wait 400
faceangles 0 90 0 1
accum 3 set 1
followspline 0 spln0 5000 wait length 32
trigger RAFT sound_idle
}
// ========================================
// sound stuff
trigger sound_idle
{
stopsound
playsound sound/hageneau/engine-idle.wav looping volume 512
}
trigger sound_start
{
stopsound
playsound sound/hageneau/engine-revup.wav volume 300
}
trigger sound_move
{
stopsound
playsound sound/hageneau/engine-workload.wav looping volume 512
}
trigger sound_stop
{
stopsound
playsound sound/hageneau/engine-revdown.wav volume 280
}
trigger sound_death
{
stopsound
playsound sound/hageneau/engine-stop.wav volume 256
}
trigger sound_rebirth
{
stopsound
playsound sound/hageneau/engine-start.wav volume 250
}
// ========================================
// ========================================
// ===========================================================================================
// ===========================================================================================
// ===========================================================================================
// ===========================================================================================
trigger run_continue
{
accum 3 inc 1
trigger self deathcheck
trigger self stopcheck
trigger self move
}
// ===========================================================================================
// movement
trigger move_check
{
trigger self stuck_check
accum 1 abort_if_bitset 3
trigger self dispatch
}
trigger move
{
trigger self move_check
wait 500
trigger self move
}
trigger dispatch
{
accum 3 trigger_if_equal 0 RAFT run_0
accum 3 trigger_if_equal 1 RAFT run_1
accum 3 trigger_if_equal 2 RAFT run_2
accum 3 trigger_if_equal 3 RAFT run_3
accum 3 trigger_if_equal 4 RAFT run_4
accum 3 trigger_if_equal 5 RAFT run_5
accum 3 trigger_if_equal 6 RAFT run_6
accum 3 trigger_if_equal 7 RAFT run_7
accum 3 trigger_if_equal 8 RAFT run_8
accum 3 trigger_if_equal 9 RAFT run_9
}
trigger run_0
{
trigger RAFT_trigger run_0
trigger RAFT run_0
trigger RAFT_build run_0
accum 1 bitset 2
followspline 0 spln0 80 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_1
{
trigger RAFT_trigger run_1
trigger RAFT run_1
trigger RAFT_build run_1
accum 1 bitset 2
followspline 0 spln1 100 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_2
{
trigger RAFT_trigger run_2
trigger RAFT run_2
trigger RAFT_build run_2
accum 1 bitset 2
followspline 0 spln2 120 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_3
{
trigger RAFT_trigger run_3
trigger RAFT run_3
trigger RAFT_build run_3
accum 1 bitset 2
followspline 0 spln3 120 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_4
{
trigger RAFT_trigger run_4
trigger RAFT run_4
trigger RAFT_build run_4
accum 1 bitset 2
followspline 0 spln4 120 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_5
{
trigger RAFT_trigger run_5
trigger RAFT run_5
trigger RAFT_build run_5
accum 1 bitset 2
followspline 0 spln5 120 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_6
{
trigger RAFT_trigger run_6
trigger RAFT run_6
trigger RAFT_build run_6
accum 1 bitset 2
followspline 0 spln6 120 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_7
{
trigger RAFT_trigger run_7
trigger RAFT run_7
trigger RAFT_build run_7
accum 1 bitset 2
followspline 0 spln7 120 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
trigger run_8
{
trigger RAFT_trigger run_8
trigger RAFT run_8
trigger RAFT_build run_8
accum 1 bitset 2
followspline 0 spln8 100 wait length 32
accum 1 bitreset 2
trigger self run_continue
}
// ===========================================================================================
// ===========================================================================================
// ===========================================================================================
trigger raise
{
gotomarker high 20
}
trigger lower
{
gotomarker low 20
}
// ===========================================================================================
// stuck checking
// digibob: since we cant return variables, just use bit 3 of accum 1 as a register… mmmm assembly…
trigger stuck_check
{
accum 1 bitreset 3
trigger self low_gate
trigger self high_gate
trigger self barrier
trigger self stuck_check_scriptlockout
trigger self stuck_check_finished
}
trigger stuck_check_finished
{
accum 3 abort_if_less_than 78
accum 1 bitset 3
}
trigger low_gate
{
accum 3 abort_if_not_equal 49
accum 2 abort_if_not_bitset 1
accum 1 bitset 3
}
trigger high_gate
{
accum 3 abort_if_not_equal 54
accum 2 abort_if_not_bitset 2
accum 1 bitset 3
}
trigger barrier
{
accum 3 abort_if_not_equal 27
accum 2 abort_if_not_bitset 3
accum 1 bitset 3
}
trigger stuck_check_scriptlockout
{
accum 5 abort_if_equal 0
accum 1 bitset 3
}
// ===========================================================================================
// stop check
trigger stopcheck_setup
{
accum 1 bitset 6 // stop if we’re stuck/no-one’s pushing 
accum 1 abort_if_bitset 8 // no one in the trigger, abort
trigger self stuck_check // call the stop check function
accum 1 abort_if_bitset 3 // we’re stuck so break out
accum 1 bitreset 6 // we’re free to move
}
trigger stopcheck
{
trigger self stopcheck_setup
accum 1 abort_if_not_bitset 6
trigger self script_lockout
// Any just stopped moving stuff goes here
trigger RAFT_sound stop
startanimation 45 10 15 nolerp norandom
wait 666
startanimation 0 1 15 nolerp norandom
wait 900
trigger self script_lockout_stop
resetscript
}
// ===========================================================================================
// ===========================================================================================
// script lockouts
trigger script_lockout
{
accum 5 inc 1
}
trigger script_lockout_stop
{
accum 5 inc -1
}
// ===========================================================================================
// ===========================================================================================
// enable/disable
trigger RAFT_enable
{
trigger self stuck_check
accum 1 abort_if_bitset 3 // stuck check
accum 4 set 0 // reset stop counter
accum 1 bitreset 8 // reset stop check
accum 1 abort_if_bitset 2 // already following spline
accum 5 abort_if_not_equal 0 // are we not in a script lockout?
accum 1 abort_if_bitset 7 // death check
// Any just started moving stuff goes here
trigger self script_lockout
trigger RAFT_sound start
startanimation 55 10 15 nolerp norandom
wait 666
startanimation 5 40 15 nolerp norandom
wait 500
trigger self script_lockout_stop
trigger self move
}
trigger RAFT_disable
{
accum 4 inc 1 // up the stop counter
accum 4 abort_if_less_than 4
accum 1 bitset 8 // set stop check
trigger self deathcheck
}
// ===========================================================================================
// ===========================================================================================
// death / rebirth
rebirth
{
accum 1 bitreset 9 // we’re visibly alive
accum 1 bitreset 7 // we’re alive again
trigger self script_lockout
wm_announce “^4The RAFT has been repaired!”
setstate RAFT_smoke default
// ----------------------------------- vo ------------------------------------------
wm_addteamvoiceannounce 0 “axis_hq_boat_stop”
wm_teamvoiceannounce 0 “axis_hq_boat_repaired_allies”
wm_teamvoiceannounce 1 “allies_hq_boat_repaired”
wm_removeteamvoiceannounce 1 “allies_hq_boat_damaged_axis”
// ---------------------------------------------------------------------------------
trigger RAFT_sound rebirth
wait 500
trigger self script_lockout_stop
}
death
{
accum 1 bitset 7
}
trigger deathcheck
{
accum 1 abort_if_not_bitset 7 // are we dead?
accum 1 abort_if_bitset 9 // are we not already visibly dead?
accum 1 abort_if_bitset 2 // are we not following a spline?
accum 5 abort_if_not_equal 0 // are we not in a script lockout?
accum 1 bitset 9 // we’re now visibly dead
wm_announce “^1The boat has been damaged!”
// ----------------------------------- vo ------------------------------------------
wm_addteamvoiceannounce 1 “allies_hq_boat_damaged_axis”
wm_teamvoiceannounce 0 “axis_hq_boat_damaged”
wm_teamvoiceannounce 1 “allies_hq_boat_damaged_axis”
wm_removeteamvoiceannounce 0 “axis_hq_boat_stop”
// ---------------------------------------------------------------------------------
setstate RAFT_smoke invisible
trigger self sound_death
alertentity kill_boat
trigger self script_lockout
startanimation 45 10 15 nolerp norandom
wait 666
startanimation 0 1 15 nolerp norandom
trigger self script_lockout_stop
resetscript
}
trigger enable_stage1
{
accum 2 bitreset 1
}
trigger disable_stage1
{
accum 2 bitset 1
}
trigger enable_stage2
{
accum 2 bitreset 2
}
trigger disable_stage2
{
accum 2 bitset 2
}
trigger barrier_destroyed
{
accum 2 bitreset 3
}
trigger disable_constructed
{
accum 2 bitset 3
}
}
RAFT_trigger
{
spawn
{
wait 500
followspline 0 spln0 5000 wait length 32
trigger RAFT_trigger bot_goal_loop
}
trigger bot_goal_loop
{
wait 4000 // check every 4 seconds
trigger RAFT raft_active_check
trigger RAFT_trigger bot_goal_loop
}
trigger raise
{
//gotomarker high 100
followspline 0 spln200 20 wait length 32
}
trigger lower
{
gotomarker low 20
}
trigger run_0
{
followspline 0 spln0 80 wait length 32
}
trigger run_1
{
followspline 0 spln1 100 wait length 32
}
trigger run_2
{
followspline 0 spln2 120 wait length 32
}
trigger run_3
{
followspline 0 spln3 120 wait length 32
}
trigger run_4
{
followspline 0 spln4 120 wait length 32
}
trigger run_5
{
followspline 0 spln5 120 wait length 32
}
trigger run_6
{
followspline 0 spln6 120 wait length 32
}
trigger run_7
{
followspline 0 spln7 120 wait length 32
}
trigger run_8
{
followspline 0 spln8 100 wait length 32
}
}
RAFT_build
{
spawn
{
wait 80
followspline 0 spln0 5000 wait length 32
}
trigger raise
{
followspline 0 spln200 20 wait length 32
//gotomarker high 100
}
trigger lower
{
gotomarker low 20
}
trigger run_0
{
followspline 0 spln0 80 wait length 32
}
trigger run_1
{
followspline 0 spln1 100 wait length 32
}
trigger run_2
{
followspline 0 spln2 120 wait length 32
}
trigger run_3
{
followspline 0 spln3 120 wait length 32
}
trigger run_4
{
followspline 0 spln4 120 wait length 32
}
trigger run_5
{
followspline 0 spln5 120 wait length 32
}
trigger run_6
{
followspline 0 spln6 120 wait length 32
}
trigger run_7
{
followspline 0 spln7 120 wait length 32
}
trigger run_8
{
followspline 0 spln8 100 wait length 32
}
}
RAFT_construct
{
spawn
{
wait 1000
constructible_class 2
constructible_health 1200
constructible_constructxpbonus 10
constructible_destructxpbonus 10
}
built final
{
alertentity RAFT
trigger RAFT RAFT_enable
}
}
RAFT_disabler
{
trigger run
{
trigger RAFT RAFT_disable
}
}
RAFT_enabler
{
trigger run
{
trigger RAFT RAFT_enable
}
}
RAFT_smoke
{
spawn
{
wait 300
attachtotag RAFT tag_smoke
setstate RAFT_smoke default
}
}
