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 / Enemy drops item when killed?

Author
Message
Walking Dead Productions
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: USA
Posted: 19th Apr 2007 03:47
Is there a way to make an enemy drop an item (such as a key) when it is killed?

When there's
no more room in HELL
the dead will walk the EARTH
Gamz
19
Years of Service
User Offline
Joined: 28th Nov 2005
Location: A bubble!
Posted: 19th Apr 2007 21:48
4 Words, 5 syllables-
Use the search button

I am a manifestation of your subconscious.
Walking Dead Productions
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: USA
Posted: 19th Apr 2007 21:58 Edited at: 19th Apr 2007 22:00
2 words, 2 syllables-
I did.

The only post that came up is from February, 2005. I figured there might have been an update or two since then

http://forum.thegamecreators.com/?m=forum_view&t=49085&b=23

Now, is there anyone more helpful than Gamz on this forum?

When there's
no more room in HELL
the dead will walk the EARTH
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 19th Apr 2007 23:19 Edited at: 19th Apr 2007 23:36
Yes, but I haven't tried it yet.

The character should activateifused=x, thus activating the key before he is destroyed.
(you have to edit the characters FPE to assign an IFUSED to it)

The IFUSED item (in this case a key) could then settargetname=x to name the character as the tartget.
Then it would use the movetotarget action to appear where the character is standing as he dies.

You need to have a delay on the calling of the destroy script for the character as to give the key time to get there before the character is destroyed. Otherwise the key would get moved to the characters spawn location rather than where he is dying.

EDIT

Here is another thread about charcters dropping items when they die.

And Another thread about dropping keys.
This one seems to have a real easy solution, but again, I have not tried any of these myself.

Don't forget to visit Conjured Entertainment
incense
19
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 20th Apr 2007 01:45 Edited at: 20th Apr 2007 01:48
I have looked for a way to make this happen and havent found it yet. I may require scripting. For objects you could use the destroyandactivate.fpi and set the "If Used" to the name of the object you want dropped. Enemies dont have a "If Used" option so I havent been able to make it work with them. I havent tried editing the FPE file in that manner yet.

If you find a way could you post it here?

Thanks.

The person that now knows the most started with many questions. Patients and tolorance are the keys to the passage of knowledge. FPSC is Getting better. Now if we can just keep the ball rolling.
Walking Dead Productions
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: USA
Posted: 20th Apr 2007 04:05
Thanks guys, I will test out these suggestions and let you know if I find a solution. Thanks for the help

When there's
no more room in HELL
the dead will walk the EARTH

Login to post a reply

Server time is: 2025-05-19 23:06:25
Your offset time is: 2025-05-19 23:06:25