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 / Skyscroll problem (cloud texture moves only once)

Author
Message
NickK
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location:
Posted: 5th Jun 2014 14:06
Hey everyone. How to get cloud texture move on a loop through the skybox?

For skyscroll I am using this method:
in "languagebank\russian\gamebank\mygame\setuplevel.fpi" below this line
":state=0:sky=skybank\natural\Ngt"
I added this
":state=0:skyscroll=skybank\alienstar\clouds.dds"
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 6th Jun 2014 16:16
Hi NickK
I'm pretty sure the "skyscroll=" is an action that is also added to a trigger in your level. First select your skybox in the editor
"File\Build Game\Level Settings\Global Script, Edit\Level Setup, Sky" then in your level add a trigger with a script like this..

best

You know you're a bad gamer when you're able to run out of infinite lives.
s4real
VIP Member
17
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 6th Jun 2014 19:11 Edited at: 10th Jun 2014 20:44


This is how I would do it basic the same as ncmako but only works with newer versions of fpsc that support skyspeed=x

best s4real

Amd fx4100,6gb ram,geforce 450
NickK
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location:
Posted: 7th Jun 2014 13:51
ncmako,s4real thanks for answers

s4real,whats the point of making trigger zone with script you wrote me if skyscroll works without it. Editing setuplevel.fpi is enough to make cloud texture move through the sky. The problem is it scrolls only one time. I need it to scroll infinitely.
s4real
VIP Member
17
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 9th Jun 2014 10:23
:state=0:sky=skybank\X (X being the locaion of your skybox)
:state=0:skyscroll=skybank\clo\clouds.dds


That should loop fine like how you added it.

What version of fpsc are you using ?

The reason I add it to a trigger zone because it easy to add.

best s4real

Amd fx4100,6gb ram,geforce 450
NickK
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location:
Posted: 9th Jun 2014 11:05
s4real,I installed the latest 1.19 update.
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 9th Jun 2014 22:59
Quote: "Editing setuplevel.fpi is enough to make cloud texture move through the sky. The problem is it scrolls only one time. I need it to scroll infinitely. "


Quote: "I installed the latest 1.19 update. "


Unless the development team did something to the command skyscroll during the work in v1.19, the command does work properly. I use v1.17 for our developments and it works properly- clouds scroll constantly. I have also tested in v1.18 and it works as it should.

Quote: ":state=0:sky=skybank\X (X being the locaion of your skybox)
:state=0:skyscroll=skybank\clo\clouds.dds"


Don't forget, if you use the above in a trigger zone, then what you specify in the trigger zone script will override what you have in the "setuplevel.fpi". That is something that few know, and most miss.

There's no problem that can't be solved without applying a little scripting.
NickK
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location:
Posted: 10th Jun 2014 14:50 Edited at: 10th Jun 2014 15:05
BlackFox, this page http://http://www.rockstevens.com/fpiref/SKYSCROLL.htm contains information about skyscroll script. It says: "If ALL the CONDITIONS are TRUE then it will perform the ACTIONS once". What conditions? Could you please explain?
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 10th Jun 2014 16:23
Quote: "this page http://www.rockstevens.com/fpiref/SKYSCROLL.htm contains information about skyscroll script. It says: "If ALL the CONDITIONS are TRUE then it will perform the ACTIONS once". What conditions? Could you please explain?"


I have no idea what the author of that page is talking about. Everything relating to scripts can be found in the official script syntax guide.

The skyscroll command as per the guide...



Anything relating to scripts should be referenced directly from the guide.

There's no problem that can't be solved without applying a little scripting.
NickK
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location:
Posted: 10th Jun 2014 19:02
BlackFox Okay, :state= has number after it. What does it stand for? And do you know other script related lines except for :skyspeed=. This is my last question to you. I just have no guesses left.Im grateful to you for trying to help me
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 10th Jun 2014 21:43
Quote: "Okay, :state= has number after it. What does it stand for? And do you know other script related lines except for :skyspeed=."


Using the example script on the page you linked...



Scripts start at :state=0", so in this case that is the first line for the script. In essence, what it is happening is the script loads and says "if the player is within 50 units of something I'm attached to (a dynamic entity, trigger), then go to "state=1" and run the skyscroll command at the same time I go to "state=1".

Obviously this example uses either a trigger zone or the script is attached to another dynamic entity to trigger the skyscroll. Although I do not use this method, I am not too sure that it will actually work this way in some versions. In the version I use, I call the "skyscroll" command in either my "setuplevel.fpi" script, or if I change skyboxes per level, then I specify it in my "loadingpage#.fpi" script when I specify the skybox I want.

There's no problem that can't be solved without applying a little scripting.

Login to post a reply

Server time is: 2024-04-23 13:13:00
Your offset time is: 2024-04-23 13:13:00