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 / script: a choice dialog for a npc who opens a door for the player

Author
Message
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 23rd Mar 2010 19:57 Edited at: 7th Jul 2010 15:50
Hi,
i made 2 scripts for a npc who askes the player if he(the npc) should open a door for him(the player).
When player says "yes" the npc follows waypoints to a door and stops there.
If the player talks again to the npc it says "The door is open. Good luck".
When the player goes away and comes back the npc says: "i'll stay here"....thats the end of the first script.
The other script has 2 more messages in it: "i sayed i'll stay here" and "Leave me alone".

Opening the door certainly works only if you have a Triggerzone at the door (with the zoneanyactivate.fpi as Mainscript) which triggers the door.
For more details about that topic see this thread:
http://forum.thegamecreators.com/?m=forum_view&t=167551&b=23

There are some differences between the 2 scripts.

The first one activates all screentext only if the player clicks Enter (or any other key you define).
And its scipted more "old style" like before Lee addet localvars to the scripting language. That makes it more hard to add more textmessages.

The second script activates all textmessages when the player comes close to the npc.
It's more polished and u can easy add as many text as you want.

Some pics to show how it's meant:

The waypoints should look like this: (you can certainly use more waypoints...it's only a testlevel)



And ingame:



She starts walking to the door:



Then you can have more blabla from her:



And so on...

(FPSC v.1.16 required)

The first script:



The second one:



And a full commented version of the second one:



Hope that helps to understand the script.
zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 23rd Mar 2010 20:34
Very nice job, they look great.

Hope This Helps
Snipesoul
17
Years of Service
User Offline
Joined: 29th Aug 2007
Location: Somewhere in New York...
Posted: 24th Mar 2010 04:07
Awesome work dude! I'll be using this!

I also like how you wrote the scripts organized and how you commented for the 2nd one because it's much easier to read than some other scripts I see around the forum

"Dad? Dad, I'm a- Ye- Not a "crazed gunman", dad, I'm an assassin! ...Well, the difference bein' one is a job and the other's mental sickness!" - The Sniper.
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 24th Mar 2010 09:37
Thank you
SekoIdiootti
15
Years of Service
User Offline
Joined: 14th Mar 2009
Location: Finland
Posted: 28th Mar 2010 14:47 Edited at: 28th Mar 2010 15:47
Cool, I'll use this for sure.
EDIT: I don't seem to get this working... Is the problem that I'm using the SAS from model pack 1?

ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 2nd Apr 2010 13:35
Quote: "... Is the problem that I'm using the SAS from model pack 1?"


No, i have tried the SAS with the script..works fine.

What exactly does not work?

Login to post a reply

Server time is: 2024-11-25 01:49:37
Your offset time is: 2024-11-25 01:49:37