SKRIPT - DON'T KNOW HOW TO CHANGE FOG SPEED

Posts

Pages: 1
I am using Wortanas Multiple Fog Skript for RPG Maker VX Ace (Link) and I am trying to figure out how to make the fog move slower.
I'm sorry, if the answer is actually very obvious, I am new here and know pretty much nothing about skripting.

My event looks like this:
(I know I have to change sx and sy but I don't know how/what format to use.)



I really hope you can help me.
Thanks in advance!

OldPat
OrudoPatto, kisama!
4948
Yeah, the fog's speed depends on the value of both sx and sy, apparently, as they are respectively the fog's horizontal speed and vertical speed.

Have you tried fog.sx = 1 and fog.sy = 1 instead of sy = 2?

I don't think you can set the speed lower than 1 (negative numbers will just produce inverse scrolling, I think). You could try with decimal numbers, but somehow I doubt it will work if it simulates the way RPG Maker handles normal parallax backgrounds. But try it anyway, maybe it will work nonetheless.
Marrend
Guardian of the Description Thread
20073
A decimal would probably be read by the engine as a floating-point variable. The instructions specify that both sx and sy are supposed to be passed integer variables. My guess, then, is that trying to pass a decimal into those variables would produce an error.
author=OldPat
Yeah, the fog's speed depends on the value of both sx and sy, apparently, as they are respectively the fog's horizontal speed and vertical speed.

Have you tried fog.sx = 1 and fog.sy = 1 instead of sy = 2?

I don't think you can set the speed lower than 1 (negative numbers will just produce inverse scrolling, I think). You could try with decimal numbers, but somehow I doubt it will work if it simulates the way RPG Maker handles normal parallax backgrounds. But try it anyway, maybe it will work nonetheless.


Yeah, I tried exchanging the 1 with a 2 but there was no change.
(and negative numbers didn't do anything tbh)

Sorry, but I don't know what decimal numbers are? Like vocabulary-wise (and maybe even maths-wise cuz I am awful at maths). Are decimal numbers numbers with a . ? Like 1.3 or 4.9?


author=Marrend
A decimal would probably be read by the engine as a floating-point variable. The instructions specify that both sx and sy are supposed to be passed integer variables. My guess, then, is that trying to pass a decimal into those variables would produce an error.


I mean, I really hope it's possible to change the speed cuz I read that this originally was a Plug-In for an older version for RPG Maker...
OldPat
OrudoPatto, kisama!
4948
Sorry, but I don't know what decimal numbers are? Like vocabulary-wise (and maybe even maths-wise cuz I am awful at maths). Are decimal numbers numbers with a . ? Like 1.3 or 4.9?

Yep, exactly.
But like Marrend said, I guess you can't use them. ;|

I think nothing changed because those values may have nothing to do with the preset you've loaded.



Go inside the script, look for this part and do your customization there, then load a preset with matching ID and see if it works.

I don't know this script, though, so I may be mistaken.
author=OldPat
Sorry, but I don't know what decimal numbers are? Like vocabulary-wise (and maybe even maths-wise cuz I am awful at maths). Are decimal numbers numbers with a . ? Like 1.3 or 4.9?
Yep, exactly.
But like Marrend said, I guess you can't use them. ;|

I think nothing changed because those values may have nothing to do with the preset you've loaded.



Go inside the script, look for this part and do your customization there, than load a preset with matching ID and see if it works.

I don't know this script, though, so I may be mistaken.

When I edited the skript the way you told me to, it just showed me an error and didn't let me open the game.

Also, how do I load a preset?
Marrend
Guardian of the Description Thread
20073
What does the error say? What, exactly, does the code for load_preset look like?
author=Marrend
What does the error say? What, exactly, does the code for load_preset look like?



I am going to be honest here, I am a bit overwhelmed, so sorry if I ask dumb questions.
OldPat
OrudoPatto, kisama!
4948
Can you screenshot or perhaps copy-paste here the modifications you made?
Mirak
Stand back. Artist at work. I paint with enthusiasm if not with talent.
9363
We won't get angry, ask away! Everyone started the same. :)
author=OldPat
Can you screenshot or perhaps copy-paste here the modifications you made?

I'm sorry, I already deleted the changes I made again, so that the game would work again.
If this doesn't get resolved, it's okay. The fog speed isn't THAT important.

author=Mirak
We won't get angry, ask away! Everyone started the same. :)

Thanks <3
Something you could try: In the script there's a bit that uses the scroll speed to determine the next position of the fog image.
# Manage fog scrolling     
@mulfog_ox[i] -= @mulfog_sx[i] / 8.0
@mulfog_oy[i] -= @mulfog_sy[i] / 8.0

Now in the original script the value's for the speed are divided by 8.0. I'd imagine if you changed this value to say 16.0 this would make it so the fog moves twice as slow. Just remember to have the number be a decimal, so 16.0 instead of 16.

Not sure if this works, but you can always give it a shot.
Marrend
Guardian of the Description Thread
20073
Curse the source-link, and the code being on one, unreadable, line! I did try to make it more legible, but, I didn't get very far! ;_;
On the 3rd page someone posted a formatted version of the script Here.
OldPat
OrudoPatto, kisama!
4948
I'm sorry, I already deleted the changes I made again, so that the game would work again.

It's okay.^^
You could try doing what Kyoui suggested.
Or try again with the sx=1 and sy=1 thing, but in the preset and see if it works (since, so far, you've used preset 2, in which both sx and sy are set to -2).

Simply, find the @sx and @sy in, say, preset 1:


And set sx and sy equal to 1. Also in the @name part of the script make sure to insert the name of the fog you're gonna use.
After all that is done, go to the event editor and add $fog.load_preset(1).

If it's still not slow enough, try Kyoui's method.
author=OldPat
I'm sorry, I already deleted the changes I made again, so that the game would work again.
It's okay.^^
You could try doing what Kyoui suggested.
Or try again with the sx=1 and sy=1 thing, but in the preset and see if it works (since, so far, you've used preset 2, in which both sx and sy are set to -2).

Simply, find the @sx and @sy in, say, preset 1:


And set sx and sy equal to 1. Also in the @name part of the script make sure to insert the name of the fog you're gonna use.
After all that is done, go to the event editor and add $fog.load_preset(1).

If it's still not slow enough, try Kyoui's method.


It worked, thank you so so much!
OldPat
OrudoPatto, kisama!
4948
author=SoulsMindPalace
author=OldPat
I'm sorry, I already deleted the changes I made again, so that the game would work again.
It's okay.^^
You could try doing what Kyoui suggested.
Or try again with the sx=1 and sy=1 thing, but in the preset and see if it works (since, so far, you've used preset 2, in which both sx and sy are set to -2).

Simply, find the @sx and @sy in, say, preset 1:


And set sx and sy equal to 1. Also in the @name part of the script make sure to insert the name of the fog you're gonna use.
After all that is done, go to the event editor and add $fog.load_preset(1).

If it's still not slow enough, try Kyoui's method.
It worked, thank you so so much!


Yay!
No problem^^
Pages: 1