I'm new to building maps, so my scripting is poor. I have stolen an objective script which I have tested on my two PC's at home [one as Axis the other as Allies]. The script works fine except that when I kill the only opposition player before planting the bomb, the game doesn't end. Why? Without any players left to difuse the bomb, they cannot win [the The Hunt or The Bridge maps are the same]. Here is the script. I have selected all of the script from the source file.
main:
level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/objective_test.scr
exec global/ambient.scr m4l1
exec global/door_locked.scr::lock
setcvar "g_obj_alliedtext1" "Capture the gun"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "- Prevent Allies from"
setcvar "g_obj_axistext2" "destroying the Flak88's"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none"
level waittill spawn
level.bomb_damage = 200
level.bomb_explosion_radius = 640
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 15 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
// level waittill roundstart
$flak88_explosive1 thread global/obj_dm.scr::bomb_thinker
$flak88_explosive1 thread axis_win_timer
thread allies_win_bomb
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------
allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end
Thanks.
He's dead Jim, but the game aint over
Moderator: Moderators
-
6thDLI-Quantum
- Corporal
- Posts: 44
- Joined: Tue Jan 14, 2003 6:08 pm
He's dead Jim, but the game aint over
[6th-DLI]Quantum
In the land of the blind, the one-eyed man is King.
In the land of the blind, the one-eyed man is King.
I've never looked at mp maps before, so I have to ask if mohaa moniters the presence of players in a map or if you have to put this in your script.
If its the latter, then thats your problem, your script makes no reference to wether there are any Axis players in the map. But I don't know how to fix this, so really this post is completely pointless
If its the latter, then thats your problem, your script makes no reference to wether there are any Axis players in the map. But I don't know how to fix this, so really this post is completely pointless
