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 / how to make an enemy "drop" an object after he/she is killed (sort of)

Author
Message
mister shakes
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Amishville
Posted: 11th Dec 2006 05:02
well i posted this question (before i saw like 20,000 other posts on the subject. i blame the search engine...) and sort of found a way to do it. the catch is the enemy will not be moving around chasing you and shooting and whatnot.

in my case, i was starting the level locked in a cell with a guard guarding me. the objective is to kill the guard to have him drop the key needed to open the door. since there is no 2nd "weapon" or a drop entity feature, this is the only way i have found...

go into your files folder and find your characters .fpe file. use fpimaker or notepad to open it, and look for a setting called isCharacter. change that value to 0(it will now behave as a standard entity). next change its destroy script to destroyandactivate.fpi. then, when editing your game, enter the name of your key in the ifUsed property. Finally, in the properties of your key change spawn at start to no.

again, unfortunately since you are removing the character behavior from the entity he will not shoot at you, but at least he drops a key
Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 12th Dec 2006 06:03
Your guard can still be a character so he can do an idle animation and stuff. Simply place the unactivated key under him and when he is killed use a script to activate the key.
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 12th Dec 2006 14:51
If your character is 'idle' why not just place a key under his feet?
Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 12th Dec 2006 20:58
sounds cool, but why don't you Just add the command "activateifused=1" to the destroy script you're using for the guard. so when he's dead the key will spawn.
If you give him a main script of defualt.fpi he'll still move a bit and look alive.

Nue B. or not Nue B. That is the question.
mister shakes
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Amishville
Posted: 13th Dec 2006 17:41
yeah i actually forgot that i posted this. i have only had this thing for like a week so i have been finding stuff by playing around. the guy looks pretty funny with his arms hanging out like a mannequin. i have been tackling scripting so i agree there are easier ways to do it. thanks for the input. got another post about zooming....if anyone knows if this ability is restricted to the source code please let me know so i dont waste my time until i can get my hands on DBpro

thanks

Login to post a reply

Server time is: 2024-11-23 05:06:06
Your offset time is: 2024-11-23 05:06:06