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 / Long text on the screen.

Author
Message
WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 21st Feb 2012 00:27
I just created this simple script to display a fake chat text. But I wonder if I could make it a bit more "diet". For instance, do I have to put the font-name, position, etc, for all text? They will always show in order, so I guess I could put those things on the top and just ignore for the rest? Or not?

Here's the code so far:



Thanks for any advice.

www.William-K.com
www.Wusik.com
WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 21st Feb 2012 01:55
Another thing, after the RETURN key press, if I don't do the 250ms delay, the script goes directly to the end. Any way to bypass the timer after the RETURN? Or this "debounce" thingy is really required?

www.William-K.com
www.Wusik.com
WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 21st Feb 2012 02:27
Anyway, I created a small PHP online tool to convert multiple lines of text into a full script:

http://www.william-k.com/fpstext/

If people like this, I can improve it.

www.William-K.com
www.Wusik.com
WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 21st Feb 2012 13:05
Just updated the php above. Now it will allow you to dim the lights when entering the "chat", go back to normal after it ends, and also activate something when completed. (like an unlock door)

I made this for my game, but, if I get request, I could make a "generic" version.

www.William-K.com
www.Wusik.com
WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 23rd Feb 2012 12:38
If you want to see an example of the script in action, check this following thread for details:

http://forum.thegamecreators.com/?m=forum_view&t=194570&b=25

Also, if you want to have the original PHP file to tweak for your own usage, let me know, ok?

www.William-K.com
www.Wusik.com
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 24th Feb 2012 17:17
didnt check, but seems very usefull for all of us. thank you very much, william. you learn very fast if you script for only a week now. chapeau.

WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 24th Feb 2012 17:34
Thanks. With time I will make it more generic and flexible.

I'm a C++ coder, so learning a script is not a big deal, but since I can't type long hours anymore, I had to go slowly. (yeah, that's me going slow, eek)

www.William-K.com
www.Wusik.com
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 24th Feb 2012 18:54
Good script, WilliamK. If I may suggest, use "etimerstart" and "etimergreater=x" instead of the old "timerstart" and "timergreater=x". If you have multiple scripts running at the same time with "timer", they will conflict. By using "etimer", you can have multiple running.


Twitter: @NFoxMedia
Meows
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 15th Mar 2012 14:41 Edited at: 15th Mar 2012 16:58
Quote: "WilliamK "

Went to the web page and trying it out now..
Thanks


EDIT::
OK love it.
I found I needed to edit it a small amount.

Suggest you add the Press enter line at state:=9 as the timer did not seem to be working. I let it sit for 5 minutes and it never scrolled to the next line
Most likely due to FPS version 1.9.8

Life is a short trip to another world
WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 15th Mar 2012 14:44 Edited at: 15th Mar 2012 14:47
I haven't done much updates to it, but, as I said, if people like this idea, I could work more on this...

www.TheSystem.wusik.com (Adventure FPS game)
www.MyGoldenRewards.com (Check this out today!)
Meows
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 15th Mar 2012 16:59
Quote: "I haven't done much updates to it, but, as I said, if people like this idea, I could work more on this"


OK edit away! It works great. Don't know what it would need to be better.

Life is a short trip to another world
WilliamK
12
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 15th Mar 2012 17:13
Maybe not better, but more flexible, as currently its hard-coded to several things.

For instance: option to remove the intro "animation" (the loading... thing)

And other things users could think.

www.TheSystem.wusik.com (Adventure FPS game)
www.MyGoldenRewards.com (Check this out today!)

Login to post a reply

Server time is: 2024-11-24 02:46:02
Your offset time is: 2024-11-24 02:46:02