[RM2K3] TRYING TO LEARN SOME BASICS

Posts

Pages: 1
Alright. I've been fiddling around with this program for two years, but I'm only now starting to seriously dedicate myself to learning my way around it. I've perused countless tutorials and lurked on other peoples' questions, trying to teach myself what I needed to know. My process usually involved:
-Seeing what someone asked for help with
-Reading the code that was supplied as the answer
-Going through every line and saying, "Okay, that's the part that makes it do this, and these other parts come in when it needs to do that. And that's how they fit together. Got it."

However, there are a few things I haven't been able to grasp with this method, and I was hoping some wonderful people could give me some quick explanations. So here goes.

1) What exactly is a loop, and in what circumstances would it be used?
2) Can I get a more detailed explanation of the importance and use of an event's x and y coordinates?

I actually have a few more, but they get kind of broad and I'm not sure if I'm allowed to load up a single topic with a bunch of questions like that, so I'll leave these for now.


Thank you~!
1) A loop is basically going over the same line of code within the loop, until there is a conditional branch that has "break loop".

2) Say you have Event A and you want Event B to teleport to Event A.
You'd use the x and y coordinates to teleport them there.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Let's say you have a cut scene where the player gets in battles over and over until he runs away. Enemy soldiers continue to run in from off-screen to the north and fight you. You could use a loop for this.

Begin Loop

: : Event Movement: move Soldier A ten steps south
: : Event Movement: move Soldier B ten steps south
: : Proceed With Movement

: : Start Battle - 2x soldier
: : : : Victory handler:
: : : : : : Set event location: put Soldier A back at his original spot, off-screen, ten steps to the north
: : : : : : Set event location: put Soldier B back at his original spot, off-screen, ten steps to the north
: : : : end victory handler
: : : : Escape handler:
: : : : : : Goto Label A
: : : : end escape handler

end loop

<Label A>
Message Window: "Alex: Run away!!!"
Teleport Hero: whatever other map your hero escapes to
Pages: 1