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 / Doorkey script

Author
Message
Hideck Goh
13
Years of Service
User Offline
Joined: 9th Sep 2011
Location:
Posted: 22nd Feb 2013 10:29
I´m trying do made a custon script, based on TheStoryteller door script, to use in a horror game.
The script is the follow: The player walk to a door, press enter and have a message (\"the door is locked\" or \"i have the key to unlock the door\").
Everything is working fine, but i don´t know how to finish the script.
I´ll post the code, so if anyone can help me to finish, I thank you in advance.


ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 22nd Feb 2013 16:00
Hi Hideck Goh
Quote: "Everything is working fine, but i don´t know how to finish the script"

Kinda lost if everything is working fine Explain what you would like it to do now. Display more text,or unlocked the door or something else?
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd Feb 2013 17:51
Quote: " Explain what you would like it to do now."

This a good question
ncmako: it looks like you practice scripting
Go futher it( I am watching your progress )

also I look in the script and see it is not actual. Storyteller is a very good scripter, but he create this some years ago, so if you use a new version of fpsc 1.2Beta you should give my script a try:



Corno_1


BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 22nd Feb 2013 18:18 Edited at: 22nd Feb 2013 18:25
Quote: "Storyteller is a very good scripter, but he create this some years ago, so if you use a new version of fpsc 1.2Beta you should give my script a try"


Storyteller's script is good because it will work in any version from v1.17+. It actually does work in every version from v1.17 up. Your script only works for v1.20 and is not necessarily required if the developer is using v1.20. You only modified the script to use more "recent" commands available at the start, which will not helps those not using v1.20. For example, the commands ":stategreater=1,statelesser=9," do not exist in older versions, and in reality were not needed in the original script.

Keep that in mind when comparing scripts.

@ Hideck Goh,

Quote: "Everything is working fine, but i don´t know how to finish the script.
I´ll post the code, so if anyone can help me to finish, I thank you in advance."


The script in question does not require it to be "finished". It does exactly what is required, unless you are wanting to expand it.


There's no problem that can't be solved without applying a little scripting.
Hideck Goh
13
Years of Service
User Offline
Joined: 9th Sep 2011
Location:
Posted: 22nd Feb 2013 20:32
Hi. I´m using FPSC 1.19.
Let me explain: the script let the player walks to the door, examine it and check if the player have the key to open. If the player have the key, the script display the message "I unlock the door". So the player can open the door and continue playing.
But something is wrong in the end of the script, because after the message "I unlock the door", the game freeze!
I don´t want to expand the script, i´m just need to find a way to continue playing after the message.
Thanks for your attention, and hope somebody can help me.
Sorry for my bad english, i´m from Brazil.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd Feb 2013 20:44 Edited at: 22nd Feb 2013 20:46
@black fox I did´t say storytellers script is not good and also know that you like to have 1.17 like others. But 1.2Beta is good and a smaller script is always better.
I know my changes are not nessessary and I did not say use my script!! As long a script works I will never tell somebody he should change it. But new is always better (joke)
But I put a line into which is nessessary in my version of FPSC.
:state=9,etimergreater=2000:state=10
without this line the text do not disappear.
Also if he has another global timer, storytellers script can break its.

Corno_1


BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 22nd Feb 2013 20:56
Quote: "without this line the text do not disappear. "


To make the text disappear, you use the "fpgcrawtextoff" command.

Quote: "Also if he has another global timer, storytellers script can break its."


Actually, the multiple "timers" will conflict and neither script will run. You cannot run multiple scripts using the "timerstart/timergreater=x"; that has always been that way since the introduction to the original timer command. What should happen is change the "timerstart/timergreater=x" to "etimerstart/etimergreater=x" and that solves the issue.


There's no problem that can't be solved without applying a little scripting.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 23rd Feb 2013 14:12
Quote: "To make the text disappear, you use the "fpgcrawtextoff" command."

Not nessessary. In 1.2 you just must go to the next state. I know this because I write a lot of scripts with the command set of fpgcrawtext.(Alternate Corno(my game))
Quote: "What should happen is change the "timerstart/timergreater=x" to "etimerstart/etimergreater=x" and that solves the issue."

I do this in my script. I never want to blame someone and the script is very good and thanks to him that he make it public, but every scripter see a script with other eyes, so I see some things which are unnessessary. Also if I can create a cleaner script, I always would do this, because a newby can more easily understand what I do there.
A example for unnessessary:



But I am not here to discuss, Hideck Goh need help and here is the help:
This code should be the mainscript in the door. This is all what you need


Hope this is what you need

Corno_1


Login to post a reply

Server time is: 2024-11-23 17:08:48
Your offset time is: 2024-11-23 17:08:48