Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / When an entity explodes, a corps appears and ragdolls to the floor, is this possible, and how do I do it?

Author
Message
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 01:37
Sorry for the long winded title.



These cylinders will be stasis tubes, with bodies inside. What I would like to be able to do is, when these are destroyed, a corps apears, then ragdolls onto the floor. Can anyone tell me how to do this, if it's even possible? Thanks in advance!

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 02:16 Edited at: 21st Aug 2010 02:17
Quote: "Sorry for the long winded title."

Do not apologise man, as that is exactly the kind of titles that make searching for stuff so much easier

Spawning the corpse is easy using the destroyandactivate.fpi script for the tubes destroy script, then just place the name of the corpse in the tubes "IfUsed" property. As to the corpse ragdolling to the floor, you could give the corpse a life of 1 second, so it dies pretty much as it spawns and should by all rights fall down dead.

Of course when you place your corpse character in the map, set it to not spawn at start in it's properties.

Placing the corpse at an angle towards the floor when placing it should also help. Maybe even giving it a high weight? will make it flop better??

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 02:51
Thanks Nbt, that sounds like it should be fairly easy to do!

Just one more question, I only have the stock corps entity, how do I place it at an angle to the floor. I know how to move it around when it's lying down, but how do I position it any way but horizontally?

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 05:24
The number keys are your friend here, play with 123456

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 06:09 Edited at: 21st Aug 2010 06:11
Ok, I've got the corpse spawning when and how I want it to. It took me a while to realise that I had to change it to dynamic mode to get it to 'spawnappear.fpi'!

Now, I just can't get it to ragdoll. It 'dies' but falls over like a rigid plank of wood! I'm guessing it's because it was originally a static entity, not a character entity?

Unfortunately, I can't find any other corpse character to use. I tried to use an unarmed zombie character, but I couldn't get it to 'spawnappear.fpi'. Unless there is another solution, I'm going to have to settle for a rigid death instead of a ragdoll death

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 14:51
I'm guessing the corpse has no bones (skeleton) ?? hence the dying plank of wood

Bruce what's with this "spawnappear.fpi" ?? just use "appear2.fpi" and right click the zombie and set "no" for "Spawn at start" in it's properties mate. Then it will not spawn until you tell it to via your exploding tube.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 15:10
Sorry, I meant appearspawn.fpi. I tried the plain appear1 and appear2 fpi scripts, but couldn't get them to work at all, that's why I had to use the appearspawn.fpi script.

I did exactly what you said in your first reply, including setting 'spawn at start' to no. I also used the destroy and activate script for when the cylinder is destroyed.

I had to give the corpse a life of 2, to give it time to fall over before disappearing. For some reason, the corpse wont fade when it 'dies', the fade script doesn't seem to want to work, it only lets me use the disappear script.

Anyway, like I said, I got it all to work, apart from the 'rigid plank of wood' death!

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 16:45 Edited at: 21st Aug 2010 16:46
Here is a video of the scifi zombie flopping out of the green scifi tube thing.

I used this as it's destroy script:



Then set the AI script for the Zombie as default, so he would not be moving on spawn. Then I made him spawn on death of a crate (with invisible texture) behind the tube. (if I killed the tube, he would flop out of thin air lol)

Attachments

Login to view attachments
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 16:57 Edited at: 21st Aug 2010 17:34
Time to start banging my head against the wall. Nothing I'm trying is working for me today aaaargh!! FPI editpad doesn't like the ragdoll part if the code snippet. Doors and switches aren't working either, no matter what script I try to use. I think FPSC hates me today lol

(Edit) doors and switches working now lol.

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 17:40 Edited at: 21st Aug 2010 17:41
Brucie baby, do as I did and make the tube also spawn an exploding entity (i.e. give the entity and zombie the same name) just behind it to kill the zombie give it a little push in the direction you want. (make the exploding entity "isimmobile Yes" so it does not bounce around on spawn)

Give the zombie 1 health and set AI script to default.fpi etc. Only need about 5 exploding damage for the entity to kill the zombie. Also set the zombies weight and friction both to around 1000 so it flops slow and slides a bit over anything. I also removed the sound set so the zombie never went "aghhhh!" on death

p.s. even though FPI Pad may moan about ragdoll it will still save that script out for you.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 17:56
Ok, I have the zombie spawning when the cylinder is destroyed, then it ragdolls how I want it to. The problem I'm having now is that it appears semi-transparent and doesn't disappear or fade away after it ragdolls. Do I need to somehow combine your script with the fadecorpse script?

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 18:01
Use "Appear2.fpi" and NOT "Appear1.fpi" to stop it being transparent.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 18:13
Thanks, that did the trick. That's it all finally sorted, both the spawning zombie and the airlock doors and switches. Now I need to sit and take stock of everything I've done the last couple of days, see what I can learn from it all! Then, I've got to transfer everything from my test level into my game level. I'll post screenies on my WIP thread when it's all in place. Once again, thanks for your help and patience

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 19:35
Glad it all worked out

Login to post a reply

Server time is: 2024-11-24 19:49:35
Your offset time is: 2024-11-24 19:49:35