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 / Script for a character to drop item when killed

Author
Message
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 10th Feb 2009 21:01
Is this script possible with any of the updates? Cheers
General Jackson
User Banned
Posted: 10th Feb 2009 21:54
I dont know. i am new to scripting but i'll try it later

It is well that war is so terrible or we should grow too fond of it- Robert E Lee
Nomad Soul
Moderator
18
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 11th Feb 2009 00:25
Yes it's possible.

- Place an enemy in the room and change destroy AI to 'pickupkey.fpi'

That works for keys so you'll probably need to use 'pickup1.fpi' or an amended version for other objects. Using 'ammo.fpi' should work for extra ammo etc.
Pride
17
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 11th Feb 2009 16:43
Nomad, if you do that, the enemy you kill will be counted as a key, meaning the enemy will disappear as you walk over him.

- You know you're curious
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 11th Feb 2009 20:53
Thanks for the answers. Its given me a few ideas to work on!
Nomad Soul
Moderator
18
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 13th Feb 2009 03:04
I tried a bunch of things using destroy and activate AI with enemy and an object.

You can't add an IfUsed field to an enemy .fpe so I don't think getting an object to appear will work and even if it did you'd be limited to having the object spawn in a fixed location unless they are setup just to shoot at you.

Enemies dropping things other than guns and ammo which they can is not a huge concern. You could still have pickups on dead static characters or in animated furniture etc which is nice is done well.

The key script approach isn't ideal but its functional.
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th Feb 2009 15:39
You CAN add an "IfUsed" field to the character's FPE file. Simply type it in with the name of the entity it should be activating.

That in mind, why not try this:

- Script a DESTROY script for the entity to activate another entity (A key) when the player gets close to it's corpse.
- Script the key entity (the one to be activated) to be picked up when it's activated.


Now, when the player approaches the dead body, they will pick up the key and the body will still be there.


The one and only,


TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 13th Feb 2009 22:01
Nice solution...Plystire. Will try it.

Login to post a reply

Server time is: 2025-05-23 17:11:32
Your offset time is: 2025-05-23 17:11:32