Right ive been trying to work this out all day looking at varoius examples and threads, unfortunantly i think this has left me even more confused (im one of those people who is unable to understand scripting sorry). What i want in my map is a set of returnable objectives like in the map Radar (radar script is no help as it has all that other stuff in it). Anyway i used the sample map in the LDR (which never seemed to work right anyway) as a base to start from. These are my entities
THE PICK UP POINT
team_CTF_redflag
count 2
scriptname radarbox
message Radar Parts
trigger_objective_info
targetname radarbox1_trigger
script name radarbox1_trigger
shortname Radar Box
track Radar Box
spawnflags 19
misc_commandmap_marker
scriptname radarbox1_cmarker
targetname radarbox1_cmarker
THE DROP OFF POINT
misc_gamemodel
model …/…/portable_radar_box.md3
targetname radarbox1
scriptname radarbox1
misc_gamemodel
model …/…/portable_radar_box_tr.md3
targetname radarbox1trans
scriptname radarbox1trans
misc_gamemodel
model …/…/portable_radar_box.md3
targetname radarbox2
scriptname radarbox2
misc_gamemodel
model …/…/portable_radar_box_tr.md3
targetname radarbox2trans
scriptname radarbox2trans
trigger_flagonly_multiple (this also has an origin brush to go with it)
spawnflags 1
targetname exitpoint2
scriptname exitpoint2
THE SCRIPT
game_manager
{
spawn
{
// Game rules
wm_axis_respawntime 20
wm_allied_respawntime 15
wm_number_of_objectives 1
wm_set_round_timelimit 20
// Stopwatch mode defending team (0=Axis, 1=Allies)
wm_set_defending_team 0
// Winner on expiration of round timer (0=Axis, 1=Allies)
wm_setwinner 0
wait 150
setautospawn "Old City" 1
setautospawn "Old City" 0
}
}
// ============================================================================
// Visual Clues for drop off points
// ============================================================================
radarbox1
{
spawn
{
wait 50
accum 1 set 0 // once only trigger
setstate radarbox1 invisible // Show radarbox
setstate radarbox1trans default // Hide red marker
}
trigger visible
{
accum 1 abort_if_not_equal 0 // Only use once
setstate radarbox1 default // Show radarbox
setstate radarbox1trans invisible // Hide red marker
wm_announce "Allies have secured the Radar Box 1!"
accum 1 set 1 // Do not use this function again
}
}
radarbox2
{
spawn
{
wait 50
accum 1 set 0 // Once only trigger
setstate radarbox2 invisible // Hide radarbox
setstate radarbox2trans default // Show red marker
}
trigger visible
{
accum 1 abort_if_not_equal 0 // Only use once
setstate radarbox2 default // Show radarbox
setstate radarbox2trans invisible // Hide red marker
wm_announce "Allies have secured the Radar Box 2!"
accum 1 set 1 // Do not use this function again
}
}
// ============================================================================
// Pick up point for Radar Boxes
// ============================================================================
radarbox
{
trigger stolen
{
setstate radarbox invisible // hide current radarbox
}
trigger returned
{
setstate radarbox default // Show current radarbox
}
}
// ============================================================================
// Exit Points - Trigger brushes
// ============================================================================
exitpoint1
{
death
{
trigger radarbox1 visible // Perform exit1 tasks
trigger game_manager final_check // Inc counter game counter
wm_announce "ExitPoint 1!"
}
}
exitpoint2
{
death
{
trigger radarbox2 visible // Perform exit2 tasks
trigger game_manager final_check // Inc counter game counter
wm_announce "ExitPoint 2!"
}
}
PROBLEMS
-
Now in game this gives me only one location where i can pick up the radar parts (the count 2 line in the team_ctf_redflag allows there to be two radar parts even though there is only one entity) and i want two locations from which to pick stuff up from. i tried dupilcating the pick up point entities, getting rid of count 2 and renaming stuff etc but this did not work. How can i have two seperate locations to pick up the parts (exactly like Radar map)
-
The drop off point has both transparent red boxes but after dropping off both radar parts only one ever becomes solid. the second one remains transparent. I read in a few threads you only need one trigger_flagonly_multiple entity so i dont know if i should use two and if so what extra scripting is required
-
lastly i want the map to end once both radar parts have been dropped off. i have no idea how to do this
In summary im pretty stuck and my head is spinning from trying a million different things all day. scripting has never made any sense to me but i usually manange to muddle my way through somehow but this time im totally stuck. if anyone has a working prefab that i can use then please let me know as it would be so much easier to wotrk these things out if only there were decent samples to work from. anyway hope someone can help otherwise i might start doing this :banghead:


