[SP->MP] Objective "A bomb is still set" SOLVED
Moderator: Moderators
[SP->MP] Objective "A bomb is still set" SOLVED
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...
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...
Last edited by SA007 on Thu Sep 10, 2009 10:19 pm, edited 2 times in total.
I allready have that line,
I'll just post the lines that seem relevant:
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
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
endI 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
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 -
and change this
to this
and instead of this
use this
***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
endand change this
Code: Select all
$bomb1 thread allies_win_bomb $bomb1 $bomb2 $bomb3 $bomb4 $bomb5 $bomb6
$bomb1 thread axis_win_timerCode: Select all
thread allies_win_bomb
thread axis_win_timerCode: 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_thinkerCode: 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_thinkerI 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/
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/
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
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

