I have a couple of animations that play when either teams wins the game.
As this animation plays I would like to see and hear some big explosions ( mission completed destroyed all the buildings kinda thing). I am not gonna make destroyed versions of the buildings, just the fireballs will suffice as they will only be on screen a second or two.
What kind of entity do I need to insert in the map to do this and what script and where would I need to put the script to set the bombs off.
This is the script thats running my animations:
Code: Select all
//----------------------------------------------------------
// Allies are enemyspawners with #set 20 with a leader #set 25
// Axis are enemyspawners with #set 10 with a leader #set 15
// all spawners are targeting info_pathnodes
// 2 cameras placed $targetname alliewincamera_1 & alliewincamera_2
//----------------------------------------------------------
win_game_allie:
//hide and freeze the players
$player nodamage
$player hide
freezeplayer
//spawn the allies
waitthread global/dm_ai.scr::spawnset 20 set20
waitthread global/dm_ai.scr::spawnset 25 cappy
//spawn the axis
waitthread global/dm_ai.scr::spawnset 10 set10
waitthread global/dm_ai.scr::spawnset 15 set15
$set10 waitthread FacingFix
$set15 waitthread FacingFix
for( local.i = 1; local.i <= $set10.size; local.i++ )
{
$set10[local.i] thread Do_Loser_End
}
$set15 thread Do_Loser_End
//Turn on the winning music
forcemusic aux2 aux2
//Turn off the hud for the movie
drawhud 0
$alliewincamera_1 watch $alliewincamera_2
$alliewincamera_1 cut
cuecamera $alliewincamera_1
wait 3
for( local.i = 1; local.i <= $set20.size; local.i++ )
{
local.rand = randomfloat .5
local.rand += .5
if( local.i <= $set10.size )
{
$set20[local.i] thread Do_Winner_End local.rand $set10[local.i]
}
else
{
$set20[local.i] thread Do_Winner_End local.rand NULL
}
}
$cappy thread Do_Winner_Allied_Cappy_End 5 $set15
end
//----------------------------------------------------------
// Allies are enemyspawners with #set 30 with a leader #set 35
// Axis are enemyspawners with #set 40 with a leader #set 45
// all spawners are targeting info_pathnodes
// 2 cameras placed $targetname axiswincamera_1 & axiswincamera_2
//----------------------------------------------------------
win_game_axis:
//hide and freeze the players
$player nodamage
$player hide
freezeplayer
//spawn the axis
waitthread global/dm_ai.scr::spawnset 40 set40
waitthread global/dm_ai.scr::spawnset 45 cappy
//spawn the allies
waitthread global/dm_ai.scr::spawnset 30 set30
waitthread global/dm_ai.scr::spawnset 35 set35
drawhud 0
//Start the music
forcemusic aux4 aux4
$axiswincamera_1 speed .3
$axiswincamera_1 fov 70
$axiswincamera_1 follow $axiswincamera_spline $axiswincamera_target
$axiswincamera_1 cut
cuecamera $axiswincamera_1
wait 2.0
//Run the winner threads
for( local.i = 1; local.i <= $set40.size; local.i++ )
{
local.rand = randomfloat 3.0
local.rand += 2.5
if( local.i <= $set30.size )
{
$set40[local.i] thread Do_Winner_End local.rand $set30[local.i]
}
else
{
$set40[local.i] thread Do_Winner_End local.rand NULL
}
}
//run the winners captain thread
$cappy thread Do_Winner_Axis_Cappy_End 5 $set35
wait 1
//run the losers threads
for( local.i = 1; local.i <= $set30.size; local.i++ )
{
$set30[local.i] thread Do_Allie_Loser_End
}
$set35 thread Do_Allie_Loser_End
end
//----------------------------------------------------------
//Do the winner anims and stuff
//----------------------------------------------------------
Do_Winner_End local.wait local.target:
self nodamage
self runto self.target
wait local.wait
self fire
if( local.target != NULL )
{
local.target takedamage
local.target damage NULL 1000 NULL (0 0 0) (0 0 0) (0 0 0) 0 9 0 0
}
end
//----------------------------------------------------------
//Do the winners captain end sequence
//----------------------------------------------------------
Do_Winner_Allied_Cappy_End local.wait local.target:
self nodamage
self runto self.target
local.rand = randomfloat 1.5
local.rand += .5
self fire
level.axisFire = 0
if( local.target != NULL )
{
local.target takedamage
local.target damage NULL 1000 NULL (0 0 0) (0 0 0) (0 0 0) 0 9 0 0
}
wait 3.5
$alliewincamera_2 watch $cappy
$alliewincamera_2 fov 40
$alliewincamera_2 cut
cuecamera $alliewincamera_2
wait 2
//dprintln "Playing Cappy end anim"
self anim 00A001_victory
wait 2
//Allies have won
teamwin allies
//fade out the music
forcemusic aux3 aux3
wait 5
end
//----------------------------------------------------------
//Do the winners captain end sequence
//----------------------------------------------------------
Do_Winner_Axis_Cappy_End local.wait local.target:
self nodamage
self runto self.target
wait local.wait
self fire
if( local.target != NULL )
{
local.target takedamage
local.target damage NULL 1000 NULL (0 0 0) (0 0 0) (0 0 0) 0 9 0 0
}
wait 5
self anim 00A001_victory
//Axis have won
teamwin axis
//fade out the music
forcemusic aux5 aux5
wait 5
end
//----------------------------------------------------------
//Axis end, they fire and die
//----------------------------------------------------------
Do_Loser_End:
self nodamage
self aimat $airstrike_origin
//self runto self.target
while ( level.axisFire == 1 )
{
local.delay = randomfloat 1.5
local.delay += .5
wait local.delay
self fire
}
end
//----------------------------------------------------------
//Allies run away
//----------------------------------------------------------
Do_Allie_Loser_End:
self nodamage
self runto self.target
end
