Page 1 of 1
Exploding barrels instead of Tltrude's popup boomcrates ?
Posted: Sun Feb 06, 2005 8:58 pm
by Kalti
I've added exploding barrels to my Venice map and I would like to respawn them after a given time but only when the one at that specific location has been destroyed.
Tltrude's
Thread for spawning explosive crates in stock maps has convinced me to try and use that setup... but I have no idea how to let the script determine wheter or not the barrel at that spot is destroyed.
Posted: Sun Feb 06, 2005 9:00 pm
by lizardkid
this should work
Code: Select all
if($barrel isalive)
{
// dadadadadadadada
}
isalive is really meaning, in existance.
func_barrel
Posted: Mon Feb 07, 2005 5:28 am
by tltrude
Far as I know, you can't move a func_barrel--not sure if you can even spawn one. My exploding crate thread uses the indicrate model, and there is no model for barrels.
So, your barrels will have to be script_objects that are already in the map. You can use "hide" and "show" to make them vanish and come back. But, the rest of the crate thread should work for the explosions and stuff.
Posted: Mon Feb 07, 2005 5:51 am
by lizardkid
not sure if you can even spawn one
it seems easy to me, make your barrel, make it a script_object, open your .mp file with Notepad, find the barrel, copy it's sizes, and spawn it at xyz with setsize ... ... ... .. ... ..
Far as I know, you can't move a func_barrel
i thought all entities could move as well :S jsut not brushes.
Posted: Mon Feb 07, 2005 3:26 pm
by jv_map
Yeah probably you could just do:
Code: Select all
local.barrel_pos = $mybarrel.origin
local.barrel_bmodel = $mybarrel.brushmodel // bsp brush ref
local.barrel =$mybarrel
while(1)
{
local.barrel waittill death
wait 5.0
// make new barrel
local.barrel = spawn BarrelObject origin local.barrel_pos model local.barrel_bmodel
}
wow!
Posted: Mon Feb 07, 2005 11:22 pm
by tltrude
That is cool, jv_map! That means there only has to be one real barrel, somewhere in the map, and more barrels can be spawned using it.
Of course, they are not exploding barrels--just the brushes.
Re: Exploding barrels instead of Tltrude's popup boomcrates
Posted: Tue Feb 08, 2005 12:08 am
by Master-Of-Fungus-Foo-D
Kalti wrote:I've added exploding barrels to my Venice map...
hes not script spawning guys a func_barrel outta nowhere.. he'll map it.
Posted: Tue Feb 08, 2005 12:16 am
by lizardkid
I would like to respawn them after a given time
He has a barrel, he wants it to respawn. can only be done via script. jv gave him the script.