Page 1 of 1

Command to destroy script_object like a crate, no explosion?

Posted: Sun Jul 25, 2004 4:49 pm
by BirdsofaFeather
I know how to make a script object explode, but is there a way to make it "explode" like a crate, with no explosion, just the breaking apart effect? I have a wooden structure that I want to break apart like a crate at a certain time in script, and I don't want to have to split it up into segments and run physics to get the effect I want of it falling apart, as it is not very important and the crate effect would be perfect.

Posted: Mon Jul 26, 2004 6:35 am
by jv_map
Why don't you make it a func_crate?

Posted: Mon Jul 26, 2004 7:10 am
by G3mInI
I think he is spawning this object into an existing map through script, not sure but thats what I think. I also was wondering if you could spawn a func_crate through scripting..

G3mInI

Posted: Mon Jul 26, 2004 8:19 am
by jv_map
Yes I think it can be done 8-)

Posted: Mon Jul 26, 2004 5:37 pm
by Splaetos
I have a wooden structure that I want to break apart like a crate at a certain time in script,
I dont think he wants it player destroyable(at least not through random gunfire), but killed by an event instead. He just wants to use the crate breaking animation rather then exploder chunks....

at least thats how i read it =)


umm can you set the health of the crate insanely high? and then do damage to it via the script?

Posted: Mon Jul 26, 2004 7:32 pm
by lizardkid
well make the crate indestructible until you want it destroyed and deal damage to it.

$crate.spawnflags = 1

when you want that cancelled so it can be destroyed

$crate.spawnflags = 0

unless it's spawned with those flags for the game.

Posted: Mon Jul 26, 2004 8:33 pm
by BirdsofaFeather
I dont think he wants it player destroyable(at least not through random gunfire), but killed by an event instead
That is correct, I don't want players to be able to destroy it. I hadn't thought about changing the spawnflags, how would I deal damage to it manually through script?

Try this

Posted: Tue Jul 27, 2004 4:23 am
by tltrude
crate_killer:

$mycrate.health = 100000
wait 10
$mycrate kill
iprintln "Boom!"

end