Here begins perhaps the greatest mapping feat I have ever pulled onto myself – a truck. Unfortunately due to a drastic lack (or non-existence) of tutorials based around scripting for vehicles, I have to look at goldrush’s truck and script. Well, so far I have a script_mover (the truck and clippings, or in my case, a big rectangular block temporarily depicting the truck), the trigger_objective_info, the trigger_multiple, a couple of nice little target_script_triggers, and a func_timer (I will not be using gold crates yet, so I deemed the flagonly unnecessary, I hope I’m right).
So far I only have 3 splines, tspln_0, tspln_1, and tspln_2. My script looks like this.
game_manager
{
spawn
{
wm_axis_respawntime 15
wm_allied_respawntime 15
wm_set_round_timelimit 30
wm_set_defending_team 0
wait 200
enablespeaker desert_sound
setautospawn "Axis Bank" 0
setautospawn "Allied Bunker" 1
}
}
truck_build
{
spawn
{
}
}
truck_construct
{
spawn
{
constructible_class 2
constructible_health 1050
constructible_constructxpbonus 10
constructible_destructxpbonus 10
}
built final
{
alertentity truck
wm_announce "The Allies have repaired the truck!"
}
}
//Let's take a quick break to see what the accums are
//accum 0: Is the truck moving? 0: no 1: yes
//accum 1: Current position
//accum 2: Dead? 0: no, we're moving, 1: yes, but we just stopped, 2: yes, but we know
//accum 3: blank
//
//Okay then!
//I guess we're ready.
truck
{
spawn
{
faceangles 0 360 0 50
accum 1 set 0
accum 2 set 0
accum 0 set 0
}
trigger run_continue
{
trigger truck deathcheck
}
trigger run_1
{
accum 0 set 1
followspline 0 tspln_0 125 wait length 100
accum 0 set 0
accum 1 set 1
trigger truck run_continue
}
trigger run_2
{
accum 0 set 1
followspline 0 tspln_1 125 wait length 100
accum 0 set 0
accum 1 set 2
trigger truck run_continue
}
trigger run_3
{
accum 0 set 1
followspline 0 tspln_2 125 wait length 100
accum 0 set 0
accum 1 set 3
}
death
{
accum 2 set 1
}
trigger deathcheck
{
accum 2 abort_if_equal 0
accum 2 set 2
wm_announce "Axis have damaged the truck!"
wm_teamvoiceannounce 0 "axis_hq_truck_damaged"
wm_teamvoiceannounce 1 "allies_hq_truck_damaged_axis"
kill truck_construct
resetscript
}
trigger truck_enable
{
trigger truck move
}
trigger truck_disable
{
trigger truck deathcheck
}
rebirth
{
accum 2 set 0
wm_teamvoiceannounce 0 "axis_hq_truck_repaired_allies"
wm_teamvoiceannounce 1 "allies_hq_truck_repaired"
trigger truck move
}
trigger move
{
trigger truck move_check
wait 500
trigger truck move
}
trigger move_check
{
accum 1 abort_if_equal 4 //hmm, looks like the move inspectors are slacking
accum 0 set 1
trigger truck dispatch
}
trigger dispatch
{
accum 1 trigger_if_equal 0 truck run_1
accum 1 trigger_if_equal 1 truck run_2
accum 1 trigger_if_equal 2 truck run_3
}
}
truck_disabler
{
trigger run
{
trigger truck truck_disable
}
}
truck_enabler
{
trigger run
{
trigger truck truck_enable
}
}
However when I fire up my map in ET I get the error, “G_Scripting: truck_disable must have a name and an identifier.” I did a search on this which led to one particular topic which suggested fixing a certain error in the script. I don’t have this error, AFAIK. I have no idea what’s going on… can someone tell me if they see something wrong with the script? PROBLEM SOLVED
Once I’m done all this I am definitely writing a tutorial for making vehicles!!
EDIT: I’ve updated the script.

