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 / Spawning an Entity

Author
Message
Anja Viotile
17
Years of Service
User Offline
Joined: 20th Nov 2007
Location: Denmark
Posted: 22nd Mar 2008 17:22
Can an specified entity be spawned on the exact position of another entity via AI scripting?

Visit us at
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 22nd Mar 2008 17:36
Hmm.....

If the entity it was spawning to was unable to move, yes....

But since we've tested with enemies dropping items, (keys,etc), it's impossible for this to happen.....


Anja Viotile
17
Years of Service
User Offline
Joined: 20th Nov 2007
Location: Denmark
Posted: 25th Mar 2008 00:39
well i got a car (immobile) want it to explode, play an anim and spawn the wrecked car.

Visit us at
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Mar 2008 01:56
That would be hard to believably pull of, but perhaps you could link the entities together... maybe have the car spawn a bunch of explosion decals when it's destroyed, then after the decals run, have one of them spawn the wrecked car.

Good luck with that!


The one and only,
~PlystirE~

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 25th Mar 2008 02:26 Edited at: 25th Mar 2008 02:36
Quote: "...well i got a car (immobile) want it to explode, play an anim and spawn the wrecked car."


...Anja Viotile, I've had good success doing something similar to what you're after by:

1. Creating a DAMAGED version from the ORIGINAL entity. Import it into FPSC.

-Set the DAMAGED model's PROPERTIES to SPAWNATSTART=NO, etc...

2. Placing both the DAMAGED and the ORIGINAL entity in the level, naming them the same. Use the B KEY to register them properly.

3. Placing any small PROP (such as a gold bar) inside of the two models listed above.

-Set the PROP to DYNAMIC
-Set the PROP's DEFAULT SCRIPT to DEFAULT.fpi.
-Set the PROP's DESTROY script to DESTROYANDACTIVATE.fpi.
-Set the PROP's ACTIVATEIFUSED to the name you have given the two models listed above.
-Set the PROP's STRENGTH identical to the ORIGINAL entity's.

4. When the ORIGINAL receives damage, and is destroyed, the PROP will be destroyed as well, and call the DAMAGED entity.

As long as the placement remains the same for both entities, the illusion works quite well...

I've done this with numerous auto turrets to give the drastic visaul cue, that the darn things are dead! With explosions, it is nearly seamless, and looks great!

Hope this helps. If you have any questions, feel free to ask.

Thanks,

Seth Black

ARE YOU A LONE WOLF? CLICK BELOW TO JOIN THE PACK.

Anja Viotile
17
Years of Service
User Offline
Joined: 20th Nov 2007
Location: Denmark
Posted: 25th Mar 2008 09:50 Edited at: 25th Mar 2008 09:53
thank you hun, works like a charm, i have a car explode, spawn the animated wreck which goes airborne with a firedecal after it now, and when in air it goes dynamic before it crashes to the grounds.. Look amazing

Would be easier though if you somehow could change/add debris shape models. Could then add doors and wheel to solo behave.

Visit us at
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 25th Mar 2008 17:07
...I'm very glad that it gave you what you needed.

ARE YOU A LONE WOLF? CLICK BELOW TO JOIN THE PACK.

Login to post a reply

Server time is: 2024-11-24 05:31:43
Your offset time is: 2024-11-24 05:31:43