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 / Can I have a character talk to me, then be destroyed when I enter a triggerzone?

Author
Message
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 6th Nov 2011 21:29
In my game, I have a major plot revealing event, where the player approaches an NPC, who then tells the player what to do next.

However, I need to be able to destroy this NPC, then, when the player approaches where he was later on, have him respawn (obviously not in sight of the player), to reveal more plot.

Is it possible to set up a trigger zone which destroys the NPC, then respawns him (or a duplicate)?

The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 7th Nov 2011 01:07
You could simply add the following line to the script as the last state after the conversation
PLRDISTFURTHER=X:destroy

If X is far enough for the player to be out of sight, it should work. The copy can be spawned again with a trigger.

In case you find my grammar and spelling weird ---> native German speaker ^^
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 7th Nov 2011 01:20
Quote: "In my game, I have a major plot revealing event, where the player approaches an NPC, who then tells the player what to do next.

However, I need to be able to destroy this NPC, then, when the player approaches where he was later on, have him respawn (obviously not in sight of the player), to reveal more plot.

Is it possible to set up a trigger zone which destroys the NPC, then respawns him (or a duplicate)?"


Hi Bruce3371,

I have a development where there is a scientist that walks down a hallway and passes by me. He heads to a door and waits there, then is destroyed at that spot when I am a certain distance away. Later, when I approach that hallway, the character is spawned at that spot and there is a "conversation" between him and the player.

The script for the first scientist character (the one that walks down the hallway first to the door and is destroyed, giving the appearance he entered the room) is as follows:



As Storyteller 01 stated, you could then set a trigger where the player would pass which would spawn the second character. You would just need to set that second character to "Spawn at start- No" and set the trigger IfUsed field to the name of that second character.

In other words, I have a second scientist character in the editor map that is set in the exact position and spawns when the player hits the trigger in the hallway. The player never sees the character spawn, but will see the character at the door as if he came out of the room.

Hope that made sense for you.


Twitter: @NFoxMedia
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 7th Nov 2011 15:22
Thanks a lot guys, I'll definately try the plrdistfurther method

I realised that I'd left the plot kind of hanging after the character makes his first 'speech', so it was a question of; 'ok I've done what you told me to do, now what??!'.

Now I just need to record the new audio file, write the 'plrdistwithin' script - et voila, that part of the game suddenly makes much more sense!!

Login to post a reply

Server time is: 2024-11-24 03:27:33
Your offset time is: 2024-11-24 03:27:33