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 Product Chat / Kill guy -> trigger door and audio?

Author
Message
Scurvy Lobster
18
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 9th Apr 2008 15:26 Edited at: 9th Apr 2008 15:45
How do I make a door open and a wave file play after I have killed an NPC in my game?
Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 9th Apr 2008 17:37
It will need some scripting, you could pull it off. The only way is to use some clever scripting.


Image made by the overworked Biggadd.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 10th Apr 2008 10:44 Edited at: 10th Apr 2008 10:47
First of all, I know what you are referring to when you say NPC but what does the acronym stand for? Always wanted to know.

Anyway, characters do not have an IFUSED in their parameters list. So, you have to add it to the character's FPE. I usually make a copy the two files related to the entity and then rename them. I copy the BMP, and FPE files. No need to copy any of the texture files or the x file. I then edit the fpe file. For an example I wanted the fantasy character Dhor to activate another entity when (the player has just bought something from him and after the "contrived" transaction is completed then the entities show up in another area. So, he needed an addition to the fpe file. The following is what I had done. What is in bold is what I changed and added. Be sure and give the desc the same name as you give the files. Dhor 2 (ifused).bmp, Dhor 2 (ifused.fpe).

+++++++++++++++++++++++++++++++++++++++++++++

;header
desc = Dhor 2 (ifused)
;ai
aiinit = appear1.fpi
aimain = peoplepassive.fpi
aidestroy = user\destroy_and_activate.fpi
aishoot =
soundset = male

;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0
ifused = object1

++++++++++++++++++++++++++++++++++++++++++++

Now you will need to put in a special script in the destroy ai of the character in order to activate the door and for the wave file to play. I can't remember if I added this to the "destroy" script folder but I think it was an addition in one of the later versions but there is a script called "destroyandactivate.fpi". You will need to modify somewhat to play a wave sound.



In this script the corpse will not remain as the character will be destroyed.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 10th Apr 2008 11:21
Quote: "I know what you are referring to when you say NPC but what does the acronym stand for? Always wanted to know"


NPC - Non-Player Character


It spawned from RPGs, the people that the computer controls that you can talk to and interact with.


The one and only,
~PlystirE~

Scurvy Lobster
18
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 10th Apr 2008 14:12
Thanks F l a t l a n d e r. I will be looking in to this.

Login to post a reply

Server time is: 2024-11-27 21:27:27
Your offset time is: 2024-11-27 21:27:27