In the Elite Force 2 map I am converting to Mohaa there is a new type of function entity called "func_explodeobject" and it seem to work in mohaa.
Anyway, I have a window set with it that explodes when players break it. There is a setthread that sets off a hall fire model and kills the player, but I would like the player's body to burn untill it vanishes. The problem is that the fire appears where the player died (on the healthpack) and not on the body. Any help would be great!
If anyone has the game "Elite Force 2" I could sure use the .cpp file (code folder file) for the func_explodeobject--because I have no idea what the spawnflags for it do.
I already added 24 units on the Z axis to bring it up off the floor. Using your lines just moves the fire to where the players back was when he died.
There is a code for making it stick with the player at death:
local.fire.detach_at_death = 0
But, using it makes the fire stay with the player when he respawns, and not on the body. A player can respawn before his dead body vanishes, which is how I took the screenshot by the way. I guess what I need is the targetname the game assigns to the body, or a way to leave the fire behind when the player respawns.
nuggets - How do I vector the angles to the body if I don't know the targetname for it? The body does not always fall the same direction, but I can get the fire at the right height above the floor.
Alcoholic - Yes, I want it to look like he was set on fire by the (hall fire) explosion.
Last edited by tltrude on Wed Sep 10, 2003 4:01 am, edited 1 time in total.
fire_glue local.fire:
local.starttime = level.time
local.stoptime = (level.time + 4)
while (1)
{
waitframe
if (isalive self) //player respawned
{
end
}
if (level.time >= local.stoptime) //if its been 4 seconds
{
end
//we stop because i dont think any death anims last 4 seconds...
}
local.where = self gettagposition "Bip01 Spine2"
local.fire.origin = local.where.origin
}
end
Alcoholic's way is probably the best . I was wrong anyway the avatars didn't dissapear I removed them after death . I had a simular problem with binding a trigger only way seemed to be to just keep moveing the trigger binding or glueing didn't work too well .
That's fine, but I wanted the fire to stay with the body and not vanish when the player respawns. A body will last about 8-10 seconds after a player dies.
The map is almost done, so I may have to scrap the whole idea.
fire_glue local.fire:
while (isalive self)
{
waitframe
local.where = self gettagposition "Bip01 Spine2"
local.fire.origin = local.where.origin
}
waitframe
local.fire droptofloor // I have never tried this but may work
wait 10
local.fire remove
end
the thread will end leaveing the local.fire on the floor at the last origin of the player
Local Nothappy is happy now! I got it working by adding a wait--so that the death animation can finish before the fire is spawned.
Here is the threads, if anyone else want to use them. This "body-on-fire" could also be used for a high voltage electrocution thread or anything that uses fire to kill.