Page 1 of 1
sigleplayer stock map conversion
Posted: Sun Feb 27, 2005 9:16 pm
by Lt.Audie L Murphy
seem to be having a slight problem with objective
in a single player map conversion
can a single player save mess up objectives ?
i scripted m1l2b ,,,and the objective i added works fine but when obj has been completed and round restarts seems obj bomb cant be set again
i looked in console and im getting this " cannot save in multiplayer game"
im certain that the save is messing this up
how would i remove save from SP map ?
ive searched all .scr files in mohaa install for some hint,,,,,
a push in right direction would be perfect
Posted: Sun Feb 27, 2005 9:35 pm
by Grassy
Sounds like it's got an auto save point trigger in the bsp somwhere.
If such an animal exists?? Try doing a search in the g_allclasses docs for something like that. Sorry that's all I can suggest on this topic.

Posted: Mon Feb 28, 2005 1:52 pm
by MPowell1944
Right below main: in the map script, add the lines removeclass triggersave and removeclass triggeronce
Posted: Tue Mar 01, 2005 8:48 pm
by Lt.Audie L Murphy
i added this to script removeclass triggersave and removeclass triggeronce ,,,,, but stillsame effect
only it dont say in console "cannot save in multiplayer"
bomb can be set and defused and explodes
but after round it doesnt reset
im thinking it might be where im setting my obj up
seems to delete things out of map,,,,, i added a radio obj
in the end room where telephone rings ,,,, added radio but it deletes 2 other radios
that are in the same building but the sound that was added to radios plays
even thou radios are gone
im thinking if i change where i have obj it might correct this problem
Posted: Wed Mar 02, 2005 5:33 am
by lizardkid
it saves at the start of the mission still, because it's an SP-made thing. that attatches an initial save and saves everywhere thereafter. make sure your g_gametype is always 4 (obj) or you'll just have to live with it.
Posted: Wed Mar 02, 2005 7:03 am
by Rookie One.pl
Saves are done only when g_gametype is set to 0.
Audie, put all the bomb code after level waittill spawn.
Posted: Wed Mar 02, 2005 11:24 pm
by Lt.Audie L Murphy
Code: Select all
//
//
//m1l2a
//
//
//
main:
removeclass triggersave
removeclass triggeronce
removeclass actor
// set scoreboard messages
setcvar "g_gametype" "4"
setcvar "session" "4"
setcvar "g_gametypestring" ""
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext4" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext4" ""
setcvar "g_scoreboardpic" "m1l2b.tga"
level.script = "maps/m1l2b.scr"
$world farplane_color (0 0 0) (0 0 0) (0 0 0) 0 9 0 0
$world farplane 15000
$interior remove
$exterior remove
$cutwire01 remove
$cutwire02 remove
$cutwire03 remove
$bomb02 hide
$bomb01 hide
$bomb03 hide
$bomb04 hide
$bomb05 hide
level waittill prespawn
exec global/loadout.scr "maps/m1l2b.scr"
exec global/DMprecache.scr
exec global/ambient.scr m1l2b
exec global/jv_sound.scr
exec global/exploder.scr
exec global/door_locked.scr
exec maps/fix0.scr
exec maps/fix3.scr
thread explosives
thread global/exploder.scr::main
thread global/barrel.scr::explosive_barrel
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
level.bomb_damage = 200
level.bomb_explosion_radius = 1024
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 1
level.dmroundlimit = 10
level.clockside = axis
fadein 2 0 0 0 1
wait 5
level waittill roundstart
end
$bomb thread global/obj_dm.scr::bomb_thinker
$bomb thread allies_win_bomb
$bomb thread axis_win_timer
$bomb thread exploder_wait
end
//******************************
// jitter large effect
// jitter_large [delay]
//******************************
jitter_large local.time:
if (local.time)
wait local.time
waitexec global/earthquake.scr .35 10 0 0
waitexec global/earthquake.scr .23 6 0 0
waitexec global/earthquake.scr 1 1 0 0
waitexec global/earthquake.scr 1.25 .3 0 1
end
allies_win_bomb:
println "[threadStart] allies_win_bomb"
while(level.targets_destroyed <
level.targets_to_destroy)
waitframe
teamwin allies
end
allies_win_timer:
println "[threadStart] axis_win_timer"
level waittill axiswin
end
exploder_wait:
println "[threadStart] exploder_wait"
while(!self.exploded) {
waitframe
}
end
This is code ive been using to convert to obj
this is code i use for obj
Code: Select all
main:
//* The bomb model
local.bomb = spawn script_model "targetname" "bomb"
local.bomb model "items/pulse_explosive.tik"
local.bomb.origin = ( 1628 -1488 -185 )
local.bomb.angles = ( 0.0 0.0 0.0 )
local.bomb.exploder_set = 1
local.bomb.explosion_fx = "models/fx/fx_explosion.tik"
local.bomb.trigger_name = "bomb_trigger"
local.bomb.target = "exploder"
//* The bomb trigger
local.trigger = spawn trigger_use "targetname" "bomb_trigger"
local.trigger setsize ( 1628 -1488 -185 ) ( 1628 -1488 -185 )
end
Posted: Wed Mar 02, 2005 11:28 pm
by Lt.Audie L Murphy
i am exec the obj from a mapfix.scr
could this be why the obj will not reset
i converted training and m1l1 ans m1l2a with this method all 3 work
obj reset when obj completed
Posted: Wed Mar 02, 2005 11:56 pm
by Lt.Audie L Murphy
soon as i removed this line works 100%
"fadein 2 0 0 0 1
wait 5 "
that i do not get
owell i can live without a fade in

Posted: Thu Mar 03, 2005 2:44 am
by Green Beret
it fades from black screen.
Posted: Thu Mar 03, 2005 6:37 pm
by Lt.Audie L Murphy
yes with that code it will fade in from black screen