Page 1 of 1
[SP->MP] Objective "A bomb is still set" SOLVED
Posted: Fri Sep 04, 2009 12:09 pm
by SA007
I'm busy converting a singleplayer map to multiplayer objective.
Almost everything is working except the "A bomb is still set" message you get when the bomb is set when the last persons are killed.
I'm trying to find out where that message is coming from and it seems to come from a dll in mohaa itself with no visible clue in the scripting.
Maybe someone here knows where it is coming from?
If it is needed i'll post the script, but it is about 800 lines long...
Posted: Fri Sep 04, 2009 8:03 pm
by ViPER
I think you need to set clockside to allies or axis
Posted: Sat Sep 05, 2009 9:19 pm
by SA007
I allready have that line,
I'll just post the lines that seem relevant:
Code: Select all
main:
removeclass actor
removeclass health
removeclass AmmoEntity
setcvar "g_gametype" "4"
setcvar "g_obj_alliedtext1" "Destroy all comms."
setcvar "g_obj_alliedtext2" "hardware"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Defend the 4 radios "
setcvar "g_obj_axistext2" "and 2 antenna's"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "m6l2a"
exec global/spotlight.scr
thread global/exploder.scr::main
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = "maps/m6l2a.scr"
exec ubersound/ubersound.scr
exec global/ambient.scr m6l2a
exec global/door_locked.scr::lock
thread global/exploder.scr::main
level waittill spawn
//****************************************************//
// MAIN PROGRAM //
//****************************************************//
level.defusing_team = "axis"
level.planting_team = "allies"
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
// set the parameters for round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
level waittill roundstart
thread defense_mg42
$bomb1 thread bomb_thinker
$bomb2 thread bomb_thinker
$bomb3 thread bomb_thinker
$bomb4 thread bomb_thinker
$bomb5 thread bomb_thinker
$bomb6 thread bomb_thinker
$bomb1 thread allies_win_bomb $bomb1 $bomb2 $bomb3 $bomb4 $bomb5 $bomb6
$bomb1 thread axis_win_timer
end
alles_win_bomb local.bomb1 local.bomb2 local.bomb3 local.bomb4 local.bomb5 local.bomb6:
while ((local.bomb1.exploded != 1) && (local.bomb2.exploded != 1) && (local.bomb3.exploded != 1) && (local.bomb4.exploded != 1) && (local.bomb5.exploded != 1) && (local.bomb6.$
wait .1
teamwin allies
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
Most of the objective code comes from obj_team4 (the bridge) and stacked tot 6 bombs.
I copied bomb_thinker and made a few changes to that:
- Other models (radiobomb in stead of explosives)
- Set time of 2 sec
- No timer with detonation, that happens when all 6 bombs are set.
I first thought that is would be something in the bomb_waittill_detonate in global/obj_dm.scr but there is nothing

Posted: Sun Sep 06, 2009 8:26 am
by jv_map
After level waittill spawn:
Posted: Sun Sep 06, 2009 10:55 am
by SA007
That unfortunatly doesn't work. Tried it with both 6 and 1 (since even though there are 6 bombs, only one actually triggers the explosion which blows up the building.
(Similar to the bridge, but with both bombs set in stead of one.)
Posted: Tue Sep 08, 2009 11:35 pm
by ViPER
Are all 6 bombs for the same objective? or are there 6 seperate objectives?
***edit - Oh I see. nm***
If you set the number of objectives to destroy like JV says - "level.targets_to_destroy = 6"
Your allies win thread should be something like this -
Code: Select all
allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end
and change this
Code: Select all
$bomb1 thread allies_win_bomb $bomb1 $bomb2 $bomb3 $bomb4 $bomb5 $bomb6
$bomb1 thread axis_win_timer
to this
Code: Select all
thread allies_win_bomb
thread axis_win_timer
and instead of this
Code: Select all
$bomb1 thread bomb_thinker
$bomb2 thread bomb_thinker
$bomb3 thread bomb_thinker
$bomb4 thread bomb_thinker
$bomb5 thread bomb_thinker
$bomb6 thread bomb_thinker
use this
Code: Select all
$bomb1 thread global/obj_dm.scr::bomb_thinker
$bomb2 thread global/obj_dm.scr::bomb_thinker
$bomb3 thread global/obj_dm.scr::bomb_thinker
$bomb4 thread global/obj_dm.scr::bomb_thinker
$bomb5 thread global/obj_dm.scr::bomb_thinker
$bomb6 thread global/obj_dm.scr::bomb_thinker
Posted: Wed Sep 09, 2009 6:41 pm
by SA007
I tried your suggestions,
In principle there is only one target to destroy but there are 6 'switches' to set before the target gets destroyed, so I changed the targets_to_destroy to 1.
I changed the alles win thread, which looks a lot better now, thank you.
Unfortunatly this also didn't get me my "A bomb is still set" message, it just goes directly to axis win
I haven't changed the bomb_thinker's because I copy-pasted the code from obj_dm.scr into my script and modified it to work with the 6 switches/1 bomb idea.
Also things like timers and models are hardcoded in that and i wanted to chenge those.
But in my opinion it doesn't matter if I use the global script or a copy-paste of it.
I'm really starting to think that either I find out what happens is everyone is killed and add the "A bomb is still set" message myself or live with it that it isn't there.
Might just be hardcoded to obj/ or something/
Posted: Wed Sep 09, 2009 10:01 pm
by ViPER
I see, I do not think the global script will do what you want. If you have one objective to destroy with all 6 bombs, then you want to use a script that has 1 bomb like the hunt.
You will need to create a routine that waits till all six are triggered then activate your single bomb thread.
Posted: Wed Sep 09, 2009 10:32 pm
by SA007
YEAH! Got it working
Turns out that the obj_dm.scr script was updated in the 1.11 patch, which is Pak7.
They changed level.bomb_set by level.bombs_planted. Changed 2 lines in my script and it works like planned
More info:
http://www.modtheater.com/forum/showthread.php?t=22929
After a lot of searching it seems i wasn't the only one with this problem
