AA Canon
Moderator: Moderators
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
fire_flak88:
// Set it to what you
// would like to destroy.
local.target = ($blast_1.orign)
// Start the main gun fire animation.
$flak88 anim fire_scripted
// Wait to give time to the shell to get to the target.
wait 1
// Set the animation back to idle ( else the fire
// animation will not work the next fire )
$flak88 anim idle
// Spawn the explosion animations.
waitthread blow_a_place_up
end
blow_a_place_up:
// Just a test target. Set it to what you
// would like to destroy.
local.target = ($blast_1.origin)
// Spawn the explosion animations.
local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
local.Exp3 = spawn "animate/fx_mortar_higgins.tik"
// Shake the ground hard.
exec global/earthquake.scr .23 4 0 0
// Get the animations going.
local.Exp1.origin = local.target
local.Exp1 anim start
local.Exp2.origin = local.target
local.Exp2 anim start
local.Exp3.origin = local.target
local.Exp3 anim start
wait 1
// Remove the animations.
local.Exp1 remove
local.Exp2 remove
local.Exp3 remove
end
thanks
// Set it to what you
// would like to destroy.
local.target = ($blast_1.orign)
// Start the main gun fire animation.
$flak88 anim fire_scripted
// Wait to give time to the shell to get to the target.
wait 1
// Set the animation back to idle ( else the fire
// animation will not work the next fire )
$flak88 anim idle
// Spawn the explosion animations.
waitthread blow_a_place_up
end
blow_a_place_up:
// Just a test target. Set it to what you
// would like to destroy.
local.target = ($blast_1.origin)
// Spawn the explosion animations.
local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
local.Exp3 = spawn "animate/fx_mortar_higgins.tik"
// Shake the ground hard.
exec global/earthquake.scr .23 4 0 0
// Get the animations going.
local.Exp1.origin = local.target
local.Exp1 anim start
local.Exp2.origin = local.target
local.Exp2 anim start
local.Exp3.origin = local.target
local.Exp3 anim start
wait 1
// Remove the animations.
local.Exp1 remove
local.Exp2 remove
local.Exp3 remove
end
thanks
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
wall
You have it backwards:
$wall_1 remove
But, there is a really cool way to blow up walls. It is called an exploder and uses the exploder script in the global folder (pak0). With it, you can add chunks that fly out, make the wall vanish and a smashed version of the wall appear, and add extra explosions/fires.
Once it is set up you can set it off with a single line in the script.
exec global/exploder.scr::explode 1
========================================
Here is the little tutorial found at the top of the exploder script:
// Exploding chunk system created by Mackey McCandlish.
//
// Before level waittill prespawn "exec global/exploder.scr".
//
// Used in levels where stuff blows up.
//
// Create a script_object that is a "undestroyed" version of the thing that is supposed to blow up and targetname it "exploder"
//
// Create a script_object that is a "destroyed" version of the thing that is supposed to blow up and targetname it
// "explodersmashed". They occupy the same physical space.
//
// Create script_object chunks of geometry that are going to fly out of the destroyable object/building and place them in the
// places they're supposed to fly from. Make them near but not touching the geometry of the explodersmashed. Targetname them
// "exploderchunk".
//
// Create one script_origin for each exploderchunk and make the chunk target the origin the same way a jump pad would target
// the jump pad destination in Quake3.
//
// Create script_models with targetname "exploderfire" and the "model" value of the tiki you want to use. These will be tiki
// explosions that will go off.
//
// Give all the chunks, smasheds, fires, and exploders the same #set value. Note you can have any number of smasheds, chunks,
// fires, or exploders, but typically you only have one smashed and one exploder. The reason you would want multiple of any
// of these is that you can give any of them a #pause value, and that will make it delay that long before occuring, so you
// could create a multistage explosion.
//
// You can create an explodertrigger (with the same #set), or just do "thread global/exploder.scr::explode #" (# being the
// #set value of the exploder in question).
$wall_1 remove
But, there is a really cool way to blow up walls. It is called an exploder and uses the exploder script in the global folder (pak0). With it, you can add chunks that fly out, make the wall vanish and a smashed version of the wall appear, and add extra explosions/fires.
Once it is set up you can set it off with a single line in the script.
exec global/exploder.scr::explode 1
========================================
Here is the little tutorial found at the top of the exploder script:
// Exploding chunk system created by Mackey McCandlish.
//
// Before level waittill prespawn "exec global/exploder.scr".
//
// Used in levels where stuff blows up.
//
// Create a script_object that is a "undestroyed" version of the thing that is supposed to blow up and targetname it "exploder"
//
// Create a script_object that is a "destroyed" version of the thing that is supposed to blow up and targetname it
// "explodersmashed". They occupy the same physical space.
//
// Create script_object chunks of geometry that are going to fly out of the destroyable object/building and place them in the
// places they're supposed to fly from. Make them near but not touching the geometry of the explodersmashed. Targetname them
// "exploderchunk".
//
// Create one script_origin for each exploderchunk and make the chunk target the origin the same way a jump pad would target
// the jump pad destination in Quake3.
//
// Create script_models with targetname "exploderfire" and the "model" value of the tiki you want to use. These will be tiki
// explosions that will go off.
//
// Give all the chunks, smasheds, fires, and exploders the same #set value. Note you can have any number of smasheds, chunks,
// fires, or exploders, but typically you only have one smashed and one exploder. The reason you would want multiple of any
// of these is that you can give any of them a #pause value, and that will make it delay that long before occuring, so you
// could create a multistage explosion.
//
// You can create an explodertrigger (with the same #set), or just do "thread global/exploder.scr::explode #" (# being the
// #set value of the exploder in question).
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
Targetname
You have to turn the wall into an entity. Highlight it and hit key N to bring up the entity window. Then find "script_object" on the list (if you click on the list and hit key S, it will take you right to the Ss) and double click it. Now you can give your script_object wall a targetname with
Key: targetname
Value: wall_1
(or Value: exploder; Key: #set; Value: 1).
Key: targetname
Value: wall_1
(or Value: exploder; Key: #set; Value: 1).
Wait
In the entity properties (key N again) of the gun's trigger put:
Key: wait
Value: 5 // or the number of seconds you want.
Key: wait
Value: 5 // or the number of seconds you want.
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
local.reload = 1
if (local.reload + 1 = 2) {
fire_flak88_1:
local.target = ($blast_1.orign)
local.reload = 2
$flak88_1 anim fire_scripted
wait 1
wait 2
$flak88_1 anim idle
waitthread damdage
end
damage:
local.target = ($blast_1.origin)
local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
exec global/earthquake.scr .23 4 0 0
local.Exp1.origin = local.target
local.Exp1 anim start
wait 1
local.Exp1 remove
end
the problem with the solution above is that even right when u walk up to it, it will wait a couple of seconds, by doing this would it make it wait ONLY after it had been fired? thats what im shottin for.
if (local.reload + 1 = 2) {
fire_flak88_1:
local.target = ($blast_1.orign)
local.reload = 2
$flak88_1 anim fire_scripted
wait 1
wait 2
$flak88_1 anim idle
waitthread damdage
end
damage:
local.target = ($blast_1.origin)
local.Exp1 = spawn "fx/scriptbazookaexplosion.tik"
exec global/earthquake.scr .23 4 0 0
local.Exp1.origin = local.target
local.Exp1 anim start
wait 1
local.Exp1 remove
end
the problem with the solution above is that even right when u walk up to it, it will wait a couple of seconds, by doing this would it make it wait ONLY after it had been fired? thats what im shottin for.
