Repeatable loop event

Gamez Boy

Villager
Member
Joined
Aug 26, 2014
Messages
6
Reaction score
0
Primarily Uses
Hello. First of all, I hope I was in the right forum for ask that. OK, say I want to create the car event that would moving forward, then it was returned to it's original place, and running repeatly, like it was just the passing-by car. But the problem is, I can't figure out how to make the event loop for itself even I had set the event to parallel process, and set the move route as repeat. Here is the example:

[A]------------------------------------------------------------> (repeat from point A]

 

Say I want to make the car event from point A was going to the point B with the move route event, then when it reaches point B, it would return at the point A and keep continue moving. But instead of this:

 

[A]------------------------------------------------------------> (stopped at point B?)

 

The car is not repeatly itself from the point B, even it was always stuck at the point B, instead of returned to point.

 

Even the loop and label command is also not effective for this because it would just make the game freeze at very beginning.

 

So, is there any better way to for how to make the car event repeat itself without any problem? I will provide the video later,as it was better way for explaining this situation.

 

Any help would be appreciated.
 
Last edited by a moderator:

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
On the event's page, where it says "autonomous movement," change the type to "custom" and then click on the move route button and enter what you want it to do, with the box "repeat" checked. Make sure it has the right number of moves, as well, or it'll get hung up (unless you click "skip if cannot move") if it tries to move too much. For example, if it only has 6 spaces to move right, but you tell it to move 7 spaces right, it'll get stuck trying to move that 7th space and won't properly move like you want it to.

You'll also probably want to change the frequency of the autonomous movement to 5: highest, or else the car will have a sort of stop-start stutter to its movement.

So, if point A and point B are 5 spaces apart, you'd change the autonomous movement to custom, click on move route, enter "move right" 5 times, "move left" 5 times, then check the "repeat" box.
 

Gamez Boy

Villager
Member
Joined
Aug 26, 2014
Messages
6
Reaction score
0
Primarily Uses
Umm.. Is there any way for how to make the car moving, then when it reached point B, the car would totally respawned from point A, and continue moving in one way, instead of doing the back-and-forth movement? Anyway, thanks for your reply.
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
In the custom move route (of the event itself), make it move towards the right/left/whatever and count the amount of tiles the car needs to be able to cross the entire map. Use this many tiles for the car to go left/right/whatever. Then, at the end of the move route, turn on self switch A. DON'T REPEAT THIS MOVEMENT ROUTE. Check 'skip if cannot move' just in case. Don't set this event to parallel process or autorun, just leave it at the default action button.


Then, create a new event page, with its condition set to Self Switch A is ON. Inside the event window, add the 'set event location' (recalling from memory, might be named something different) command, and reset the car event back to its beginning spot. Then turn self switch A off. Set this event page to parallel process.


That should do the trick to get the car to move all the way to the end of the map, and loop back to the front.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You can still do this via Autonomous Movement as well. I am going from memory here, so sorry if I give you something that causes an error - I'm at work and don't have Ace with me.


This is working on the assumption that you just want it to move horizontally across the screen from left to right, but you could change it if your move route is more complicated.


Autonomous Move Route - Custom - Repeat


- Move Right


- Script: moveto(0,@y) if @x == $game_map.width - 1
 
Last edited by a moderator:

Gamez Boy

Villager
Member
Joined
Aug 26, 2014
Messages
6
Reaction score
0
Primarily Uses
@Celianna Thanks so much I tried to follow it and here's the result:

http://youtu.be/6O090K57RUo

@Shaz Thank you for your nice tips, too. I wonder how to use that script, i mean, what should I put in the script.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Set Move Route has an option in the lower right called Script. You just click that button then type in everything I've put after Script: just as I put it (don't include the Script: )
 

Gamez Boy

Villager
Member
Joined
Aug 26, 2014
Messages
6
Reaction score
0
Primarily Uses
Set Move Route has an option in the lower right called Script. You just click that button then type in everything I've put after Script: just as I put it (don't include the Script: )
thank you.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top