Charas-Project
Game Creation => Requests => RPG Maker Programming => Topic started by: thebard on July 09, 2006, 01:59:34 AM
-
So I've read thoroughly and intimately every 'make clouds scroll merrily across your screen' tutorial that I can get my bloody hands on. To no avail.
The one time it appeared as though it was actually going to work, and all the code checked out, my computer crashed as a result of the infinite looping paralell process.
So, here is what I've been doing:
Event Type: Paralell Process
<>loop
<> Show Picture 1, Morning 1, (-320, 120)
<> Move Picture 1, (320, 120), 30.0 Sec. (Wait)
End Loop
<>
Now... I did also correctly set the transparency both upper and lower to 50%. I have done this before, using this method a long time ago and it resulted in pleasantly scrolling clouds.
Now, however the clouds reach the end of the transition and instead of scrolling as intended, in a seamless cloudscape, there is an abrupt shift and the straight edge of the image cuts across the screen.
I noticed that the 'morning' clouds were looped and formed a continuous cloudscape, so obviously they were intended for this. Perhaps I'm just really bad at problem-solving, but try as I might, I cannot will these clouds to scud merrily across the sky as I would like.
Since clouds are an integral part of the ambience of several scenes in my game, I would appreciate any help you can give me, thanks!
-
If you want it to work prefectly, you'll have to use varibles. There is no other method to escape that.
-
Thank you for the quick response.
What do I need to do with variables? I know how to use them, and what they do already... but I'm not sure how this one is supposed to work?
Is it adding to a variable every time it loops or something? Or are variables used to track the position of the image?
: /
-
First off, you're going to need two pictures, or rather 1 picture, and display it twice. You see, you have the one picture, it scrolls, but when it resets back to the beggining, it'll erase itself and you'll get that wierd effect.
So, do something more like this.
Event Type: Paralell Process
<>loop
<> Show Picture 1, Morning 1, (-320, 120)
<> Show Picture 2, Morning 1, (-640, 120)
<> Move Picture 1, (320, 120), 30.0 Sec.
<> Move Picture 2, (-320, 120), 30.0 Sec.
<> wait 30.0 sec.
End Loop
<>
Those locations probably aren't right, but basically you need to line up the pictures so that their edges touch but don't overlap. Additionally, when the picture is done moving, you want the second picture to be in the same position as the first one started, that way, you shouldn't be able to tell when it loops, and it should go smooth. Try running something like that, if its not lined up right, try modifying the possition slightly untill you do have it lined up right.
Yeah, you could use variables and such and actually time everything out, but I think this way is easier.
-
I tested that, and logic tells me it would work if both pictures could move simultaneously, but as it is, the second picture waits until the first finishes it's complete movement, therefore leaving a still image of clouds on screen while the second pic begins to scroll.
I unchecked 'halt other processes' and that crashed my computer good, so is there another way to have both images move simultaneously?
Two events, perhaps?
-
I used to have this problem. Let me say now to never have a Loop in a Parallel Process event. Use labels instead.
This is Dragonblaze's idea with what I'm talking about:
Event Type: Paralell Process
<> Label 1
<> Show Picture 1, Morning 1, (-320, 120)
<> Show Picture 2, Morning 1, (-640, 120)
<> Move Picture 1, (320, 120), 30.0 Sec.
<> Move Picture 2, (-320, 120), 30.0 Sec.
<> wait 30.0 sec.
<> Jump to Label 1
<>
The only time loops are really useful (or at least to me) are when you use one time Autostart/Erase Events.
If this doesn't work, can you tell me? I'll be happy to help.
-
Yeah, I find a loop a much buggier, less-powerful version of labels. Labels I find FAR better, and when you know how to use them it simplifies your events a lot.
And as Aboutasoandthis said, never loop with a Parallel Process... especially seeing as Parallel Processes loop anyway ;)
It looks like DB's idea will work to me...
-
Yeah, labels are probably better to use than loops.
I know back when I was in computer programing class, I'd always use labels instead of loops for somethings, and then I got downgraded bceause my teacher said we should never use labels...
-
:o
They're so useful though... I can't imagine doing some of my systems without them...
I guess your teacher would know better than me though :p