Simple gold crate objective script


(Nerosis) #1

After countless hours of hacking and searching the web, my single gold crate script works perfectly when i load it with \g_gametype 2 and \sv_pure 0 commands. But when i package it in the pk3 with campaign and arena files, the allies can retrieve the gold crate and when they place it in the correct spot the level does not end, it just keeps going. Any ideas why? Or point me in some other direction.

Here’s my simplistic script:

game_manager
{
spawn
{
wm_axis_respawntime 15
wm_allied_respawntime 15
wm_number_of_objectives 2
wm_set_round_timelimit 15
// 1: steal gold
wm_set_main_objective 1 1
wm_objective_status 1 1 0
wm_set_defending_team 0
wm_setwinner 0
accum 1 set 0
}
// Secured the gold crate
trigger objective1
{
wm_objective_status 1 1 1
trigger game_manager checkgame
}
// Steal the gold crate
trigger axis_object_stolen
{
accum 1 set 1
wm_announce “Allied team is escaping with the Gold Crates!”
}
// Return the gold crate
trigger axis_object_returned
{
accum 1 set 0
}
trigger checkgame
{
accum 1 abort_if_not_equal 1
wm_setwinner 1
wait 1500
wm_endround
}
}

transmitter_obj
{
spawn
{
}
death
{
trigger game_manager objective1
}
}


(Danyboy) #2

Does the map end correctly if your not using a pk3 file for your map?

If that happens then you haven’t included something in your pk3 file or you’re running and old map version perhaps


(Nerosis) #3

Of course i solved my own problem.
Note to all newbie mappers:
The .script file goes into the /map folder inside the pk3 zip file, NOT the /script folder. Otherwise alot of weird stuff happens, the game tries to make it’s own script and things don’t work right.