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 / Fixing "destroy" to make enemies corpses not disappear

Author
Message
Joe Schmo 69
13
Years of Service
User Offline
Joined: 11th Jul 2011
Location:
Posted: 11th Jul 2011 23:47
So basically one of my friends thought it would be funny to make my enemies just disappear when I killed them. I have no idea how he did it and have little scripting knowledge but I do understand the fundamentals from a Google search or two.

Whenever I kill an enemy (any kind) they just disappear instead of falling back or anything. The same thing happens if I change the destroy script to "leavecorpse.fpi" or any other script. And I have already checked that the contents of the scripts are exactly the same as before... Any help is appreciated.

Attachments

Login to view attachments
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 12th Jul 2011 18:01 Edited at: 12th Jul 2011 18:06
Use the leavecorpse.fpi script in the scriptbamk/destroy folder and use it as your destroy script. Code below.
Also before you completly run the character out of health (10 - 20), tell it to use the above script first instead of letting the engine go thru it destroy routine. You would put this part into your main AI script. Use the healthless condition to determine when the charaters health has gone below said health and point it to a state in the main AI that tells the engine to call the destroy script. runfpidefault=3.




This will leave the corpe.

Hope that helps

Nothing but coffee in my veins 'Insomnia is Coming'
Joe Schmo 69
13
Years of Service
User Offline
Joined: 11th Jul 2011
Location:
Posted: 12th Jul 2011 19:36 Edited at: 13th Jul 2011 04:10
Quote: "tell it to use the above script first instead of letting the engine go thru it destroy routine. "


Don't know how to do that.

Sorry I'm very new to scripting. Where do I put the "heathless" condition and/or the "runfpidefault=3" command? In the main character/entity AI? If so where in that file? Thanks. Sorry for being a newb.

Also is it possible to change the engines default "destroy routine"?
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 13th Jul 2011 11:20
Can you post your main AI script for this character.

With out that it would be very hard to tell you exactly were to put it.

You dont have to change anything in the engine. this can be achived by scripting.

Nothing but coffee in my veins 'Insomnia is Coming'
Joe Schmo 69
13
Years of Service
User Offline
Joined: 11th Jul 2011
Location:
Posted: 14th Jul 2011 01:51
Ya sure. You must understand though that the main AI character scripts are not altered in any way. I have another copy of the program on another computer and all the destroy scripts and all the character AI scripts are exactly the same. But on the other computer I can change the destroy script and it actually changes, this one does nothing.

I just picked a random AI script that I know doesn't work.

Attachments

Login to view attachments
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 14th Jul 2011 14:42
Below is the pace10 script for the main AI of the character FPE file you posted. I have added the first state=1 line and the last two lines. bypassing the death animation routine for the game engine.




:state=1,healthless=25:state=10
the above line checks for the characters health. when health below 25 is acheived. then goto state=10.

Animation 8 is the standard death animation I believe. Might want to check this.
So when it goes to state=10 run death animation goto state=11

State=11,Check for death animation to finish then suspend.

The suspend action stops the character from functioning but does not destroy it, leaving the character on the ground where it died.

You can do this for any character or entity therefore bypassing the game engines death routine.

Hope this explains better.

Nothing but coffee in my veins 'Insomnia is Coming'
Joe Schmo 69
13
Years of Service
User Offline
Joined: 11th Jul 2011
Location:
Posted: 14th Jul 2011 21:54
Thank you that did explain better but still didn't work. The guy still just disappeared when I shot him. Right now I am mainly wondering why the other program (FPS Creator Free) on the other computer works and goes through the destroy script I set it to but this one does nothing.. And the scripts are exactly the same.
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 15th Jul 2011 00:29
OK it looks like I have everything here to test this in a test map.

Why it works on one and not the other might be any number of reasons.

I will zip it up and put it in a download link in my next post. You can compare them and see were the difference may be.

Post anny other info I might need.

Nothing but coffee in my veins 'Insomnia is Coming'
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 15th Jul 2011 01:28 Edited at: 15th Jul 2011 01:30
eventually stupid question @ threadopener:

did you only change the entity-fpis to correct this problem, or do you also change the destroy-scripts in the editor on the placed entities? placed entities dont react on changes made in the original fpi after placed in the map. i forgot this a lot of times in scripting-rage and wondered why changes dont trigger in the testmaps. one of these facepalm-moments.^^
Joe Schmo 69
13
Years of Service
User Offline
Joined: 11th Jul 2011
Location:
Posted: 15th Jul 2011 04:30
Haha, no I haven't had to change the destroy scripts at all. They are identical to the original form with no changes made to them at all. I must stress that I can not find a single letter in any of the scripts involved that has been changed. Is there any possible way that you can disable death sequences all-together? Maybe that's what's wrong?
Pirate Myke
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 19th Jul 2011 19:18 Edited at: 19th Jul 2011 19:33
Try disableing anim 8, 11, and 25 and see what happens.
I opened him up in max to see the animations. and I found his animation where he falls down. But I could not get it to stop at the end of this frame. Even costumizing the script.

I did the above and got rid of the destroy scripts all together and he did not fade, but he also did not fall to the ground and stood there lifeless. Still not whats needed

Maybe engage ragdoll as the last command in your AI script and see how it reacts. This might just drop him to the ground and he will twitch for a bit then suspend.

In all my custom character animations I have to do custom death animations. It is so much easier to script them when you make the animations yourself. The custom one I do, dont have this issue.

I know that don't help with this character. Sorry.


Joe Schmo 69
13
Years of Service
User Offline
Joined: 11th Jul 2011
Location:
Posted: 26th Jul 2011 23:42
Thanks for your input guys but a simple re-install solved my problem. I didn't want to do it initially cuz it would delete all the scripts that I modified and custom things I did but I backed up some of them so oh well. Thanks for your time anyway.
Casis
13
Years of Service
User Offline
Joined: 5th Aug 2011
Location:
Posted: 5th Aug 2011 14:48
Omg i have the same problem only when i re install the game it's still the same so please ask your friend what hè did changed cuz my friend is now on holiday -_-" PLEASEEE
erebusman
13
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 29th Aug 2011 07:12
I have the same problem here, made a new character using the default .bip file.

He looks great in game but when he dies he falls to the ground and disappears.

I modified the line to read:

destroy\leavecorpse.fpi

But no better result.

I'd be willing to do a reinstall but per the last person who did it .. it may not work. I think something else must have worked for the first guy .. Id rather know what that is.

I've made NO code changes at all .. I'm a modeler not a coder at this point.

The only file Ive edited is the characers .fpe file.
erebusman
13
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 29th Aug 2011 07:15
Well after messing around further I got it to work ..

I thought about what would change if I had reinstalled...

So there was ONE other thing other than an FPE I had made and that is a level to test my model in.

So I thought

A) Make a new level OR;
B) remove my entity and re-place it

Option B worked!

Login to post a reply

Server time is: 2024-11-24 06:07:45
Your offset time is: 2024-11-24 06:07:45