i tried script on damaged village works great
when i tried on another map i get no sound while bomb is ticking
only last 10 15 sceonds does it tick ,,,, any suggestions how to get sound back and add a stop watch ?
i edited ubersound and uberdialog like so "m1l1 m dm moh obj training"
i added m1l1 this is map im adding objective too
And After obj is complete and round is over ,,,, everyone spawns with only handgranades plz help
and the flak88 also will blow up without having axis players to defend the flak
// DESTROYED VILLAGE
// ARCHITECTURE: NED
// SCRIPTING: NED
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Destroyed Village"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm2"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread objectivethread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/door_locked.scr::lock
level.script = maps/dm/mohdm2.scr
exec global/ambient.scr mohdm2
////////////////////
level waittill spawn
/////////////////////
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
objectivethread:
setcvar "g_gametype" "4"
setcvar "g_obj_alliedtext1" "- Find and destroy"
setcvar "g_obj_alliedtext2" " the axis Flak"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "- Protect the flak"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
level waittill prespawn
thread spawn_flak ( -299.23 1043.96 29.45 ) 180
/////////////////////
level waittill spawn
////////////////////
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_destroyed = 0
level.targets_to_destroy = 1
// set the parameters for this round/wave based match
level.dmrespawning = 1 // 1 **wave based** or 0 **round based**
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
//waitthread spawn_flak ( -2618 -3215 .12 ) 180
//level waittill roundstart
$flak88_weapon1_explosive thread global/obj_dm.scr::bomb_thinker
$flak88_weapon1_explosive thread allied_win_bomb
end
allied_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end
//------------------------------------------------------------------------
spawn_flak local.origin local.angle:
local.angles = ( 0 local.angle 0 )
local.x = (angles_toforward local.angles)
local.y = (angles_toleft local.angles) * -1
local.z = angles_toup local.angles
local.flakbase = spawn script_model
local.flakbase model "statweapons/flak88base.tik"
local.flakbase.origin = local.origin
local.flakbase.angles = local.angles
local.flakbase.targetname = "flak88_base1"
local.flakcoll1 = spawn script_model
local.flakcoll1 model "items/dm_50_healthbox.tik"
local.flakcoll1.origin = local.origin
local.flakcoll1 setsize ( -100 -26 -50 ) ( 105 26 100 )
local.flakcoll1.angles = local.angles
local.flakcoll1 hide
local.flakcoll2 = spawn script_model
local.flakcoll2 model "items/dm_50_healthbox.tik"
local.flakcoll2.origin = (local.origin + (local.x * 50))
local.flakcoll2 setsize ( -15 -75 -50 ) ( 15 75 100 )
local.flakcoll2.angles = local.angles
local.flakcoll2 hide
local.flak = spawn script_model
local.flak model "statweapons/flak88turret.tik"
local.flak.origin = (local.origin + (local.z * 48))
local.flak.angles = local.angles
local.flak.targetname = "flak88_weapon1"
local.flak.destroyed_model = "models/statweapons/flak88_d.tik"
local.bomb = spawn script_model
local.bomb model "items/pulse_explosive.tik"
local.bomb.origin = (local.origin + (local.x * 7.75) + (local.y * -35.78) + (local.z * 64.0))
local.bomb.angles = local.angles
local.bomb.targetname = "flak88_weapon1_explosive"
local.bomb.explosion_sound = "grenade_explode"
local.bomb.explosion_fx = "fx/fx_flak88_explosion.tik"
local.bomb.trigger_name = "flak88_weapon1_trigger"
local.bomb.target = "flak88_weapon1"
local.trigger = spawn trigger_use
local.trigger.targetname = "flak88_weapon1_trigger"
local.trigger.origin = (local.origin + (local.x * -3.0) + (local.y * -30.0) + (local.z * 71.0))
local.trigger setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trigger.angles = local.angles
end
Adding Flak88 objective
Moderator: Moderators
-
Lt.Audie L Murphy
- Lance Corporal
- Posts: 22
- Joined: Wed Feb 16, 2005 8:47 am
I have seen this method before and found it had problems. I gave up after trying a few ideas and did it another way.
Also I dont know why the healthbox is spawned, it is an item and from memory in SH if you define it as a script_model it causes errors.
I just spawn items like this;
local.healthbox1 = spawn models/items/item_100_healthbox.tik origin ( -6318 -1903 712.20 ) angles ( 0 0 0 )
Other than that I cant see anything obvious that is making players not get weapons. Set developer mode so you can log any console errors in more detail, it might show you where the error is happening.
Edit after looking again
Move the line in "prespawn" that calls the thread to spawn the flack below "waittill spawn" spawning things like this too early often causes problems.
Also I dont know why the healthbox is spawned, it is an item and from memory in SH if you define it as a script_model it causes errors.
I just spawn items like this;
local.healthbox1 = spawn models/items/item_100_healthbox.tik origin ( -6318 -1903 712.20 ) angles ( 0 0 0 )
Other than that I cant see anything obvious that is making players not get weapons. Set developer mode so you can log any console errors in more detail, it might show you where the error is happening.
Edit after looking again
Move the line in "prespawn" that calls the thread to spawn the flack below "waittill spawn" spawning things like this too early often causes problems.
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
mine looks like soallied_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
Code: Select all
allied_win_bomb local.bomb1
while (local.bomb1.exploded != 1)
wait .1
teamwin allies
end
yeh i always spawn without variables, the most retarded method is variable spawning imo.... but a lot of people use it, mostly gurus so it must have some major advantage over one-line-spawning.
or whatever else you want to put in there. it's easier and less space/mem consuming than making a bunch of variables.
Code: Select all
spawn models/weapons/colt45.tik "origin" " 1 2 3" "angles" "69"Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
This is the DV objective script I wrote a while back, with the credits removed of course
Original version was posted here:
http://www.modtheater.com/forum/showthr ... post136844
Original version was posted here:
http://www.modtheater.com/forum/showthr ... post136844
