Page 1 of 1

It worked, now it does not

Posted: Wed Jul 02, 2003 4:04 pm
by Desert Eagle
at one point it worked. Now the objective thread does not work. I have checked everything and it still does not work. It would seem like it never figures out the flaks have been destoryed now and for the allies to win.

Here is the whole script:


// MP_SNOWY_AMBUSH_OBJ
// ARCHITECTURE: [FS] Desert Eagle
// SCRIPTING: [FS] Desert Eagle

main:
setcvar "g_gametype" "4" //Objective

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Destroy Three 88s"
setcvar "g_obj_alliedtext2" "By Whatever Means"
setcvar "g_obj_alliedtext3" "You Have At Hand"
setcvar "g_obj_axistext1" "Defend Three 88s"
setcvar "g_obj_axistext2" "Destroy The Allies"
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" ""

level waittill prespawn

//----------------------------------------------
//Map Prep
//----------------------------------------------

exec global/DMprecache.scr
exec maps/obj/mp_snowy_ambush_obj_precache.scr
exec global/ambient.scr mohdm5
exec global/stationaryweapons.scr
level.script = maps/obj/mp_snowy_ambush_obj.scr
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw


//----------------------------------------------
//Flak, AAgun, Nebel Collision Setup
//----------------------------------------------

$flak1.collisionent = $flak88_collision
$flak1_turret0.collisionent = $flak88_turret_collision
$flak1 thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/flak88_d.tik" $flak88_destroyed_collision

$flak2.collisionent = $flak88_collision
$flak2_turret0.collisionent = $flak88_turret_collision
$flak2 thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/flak88_d.tik" $flak88_destroyed_collision

$flak3.collisionent = $flak88_collision
$flak3_turret0.collisionent = $flak88_turret_collision
$flak3 thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/flak88_d.tik" $flak88_destroyed_collision

$nebel.collisionent = $nebelwerfer_collision
$nebel_turret0.collisionent = $nebelwerfer_turret_collision
$nebel thread global/stationaryweapons.scr::MountedStationaryWeaponWithCollision "models/statweapons/nebelwerfer_w_d.tik" $aagun_destroyed_collision

level waittill spawn

//----------------------------------------------
// Set Up Sounds & Weapons
//----------------------------------------------

$truck_run loopsound sub_idle
$truck_burn1 loopsound fire_med1
$truck_burn2 loopsound fire_med1
$burn_barrel loopsound fire_small

$mg MaxYawOffset "55"
$nebel_turret0 MaxYawOffset "180"

//----------------------------------------------
// Let It Snow
//----------------------------------------------

snow:
wait 1

level.rain_speed = "60"
level.rain_speed_vary = "2"
level.rain_length = "2"
level.rain_width = "1"
level.rain_density = "5"
level.rain_slant = "1"
level.rain_min_dist = "768"
level.rain_numshaders = 12
level.rain_shader = "textures/snow"


end

//----------------------------------------------
// Set Up Objective
//----------------------------------------------

thread allied_victory
thread axis_victory

//----------------------------------------------
//Allies Win
//----------------------------------------------
allied_victory:

$flak1 waittill death
if($flak2)
$flak2 waittill death
if($flak3)
$flak3 waittill death

teamwin allies

end

//----------------------------------------------
//Axis Win
//----------------------------------------------

axis_victory:

level waittill axiswin

end

level waittill roundstart

end

Posted: Wed Jul 02, 2003 4:39 pm
by jv_map
You have a lot of 'loose' ends, for example one below the 'snow:' 'thread'.

Posted: Wed Jul 02, 2003 4:45 pm
by Desert Eagle
Do I not need end statements at the end of threads?

Posted: Wed Jul 02, 2003 7:53 pm
by jv_map
You do, but you should not make a thread in the middle of one another :wink:

$mg MaxYawOffset "55"
$nebel_turret0 MaxYawOffset "180"

//----------------------------------------------
// Let It Snow
//----------------------------------------------

snow:
wait 1

level.rain_speed = "60"
level.rain_speed_vary = "2"
level.rain_length = "2"
level.rain_width = "1"
level.rain_density = "5"
level.rain_slant = "1"
level.rain_min_dist = "768"
level.rain_numshaders = 12
level.rain_shader = "textures/snow"


end

//----------------------------------------------
// Set Up Objective
//----------------------------------------------

thread allied_victory
thread axis_victory


should be

$mg MaxYawOffset "55"
$nebel_turret0 MaxYawOffset "180"

//----------------------------------------------
// Let It Snow
//----------------------------------------------

wait 1

level.rain_speed = "60"
level.rain_speed_vary = "2"
level.rain_length = "2"
level.rain_width = "1"
level.rain_density = "5"
level.rain_slant = "1"
level.rain_min_dist = "768"
level.rain_numshaders = 12
level.rain_shader = "textures/snow"

//----------------------------------------------
// Set Up Objective
//----------------------------------------------

thread allied_victory
thread axis_victory

Posted: Thu Jul 03, 2003 7:17 pm
by Desert Eagle
Well I guess the one end statement after the snow was causing the problems and it was never reading the objective threads. I moved some stuff around and did some editing, and now it works correctly again.

As always thanks for your time JV.