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 / Enemies dropping items when killed?

Author
Message
protoborg
17
Years of Service
User Offline
Joined: 2nd Jul 2007
Location: Somewhere in this reality
Posted: 2nd Jul 2007 20:57
How would script an enemy to drop an item (i.e. a key) when they die? If I am going to make an fps, I need to be able to hide keys inside enemies. I can make the object not spawn when the game loads. That is simple. What I need is for the enemy to "carry" the key until you kill them. The entity would then drop the key wherever they are killed. This way the key is not simply in the level waiting to be found. Does anyone know how I would do this?

You know your code sucks when it does what you want before you know what you want.
Maxi Studio
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location: The Middle Of Norway
Posted: 5th Jul 2007 16:31
Select your enemy to have the key as his "weapon" when he start.

( if you understand )


[href]http://www.nettklikk.no/cgi-bin/payperclick/clickthru.cgi?id=matsjakobsen92 [/href]
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 5th Jul 2007 19:16
Quote: "Select your enemy to have the key as his "weapon" when he start."


Look at your post again and find the word 'weapon'

protoborg
17
Years of Service
User Offline
Joined: 2nd Jul 2007
Location: Somewhere in this reality
Posted: 5th Jul 2007 21:10
How exactly do I do that as keys are not treated as weapons? Also, something I clearly should have mentioned is that I want the guy to have a weapon in addition to the key. In other words, he is a guard and has the only key to the door you need to pass through. As a guard, he is going to be armed. He paces a patrol path and will shoot you on sight. You must kill him before he will relinquish the key.

You know your code sucks when it does what you want before you know what you want.
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 5th Jul 2007 22:25
Let me know as well if you find a solution!
107295
17
Years of Service
User Offline
Joined: 26th May 2007
Location:
Posted: 11th Jul 2007 16:09
I suppose you could try spawn the key inside the npc?

Nah.
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 11th Jul 2007 16:35
You could try my idea for opening a door when more than one enemy is killed. Set the count to one. When the character is killed, have the box activate a key rather than the door. You would have to ensure the key is near the enemy and neither can end up too far from the other. How about the door opens to reveal the key inside a small room?

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

Login to post a reply

Server time is: 2024-11-23 20:51:49
Your offset time is: 2024-11-23 20:51:49