Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: Vidian on October 19, 2007, 06:05:46 PM

Title: Label
Post by: Vidian on October 19, 2007, 06:05:46 PM
I thought "Label" was just a way to put a random number somewhere.
Then I saw, "Go to Label".

Does anyone know what Label and Go to Label actually do?
Title:
Post by: ZeroKirbyX on October 19, 2007, 07:44:30 PM
If you input "Labe one" then have a message say "Hi" and after that have "Go to label one" it jumps to that point in the command.
Title:
Post by: aboutasoandthis on October 19, 2007, 08:08:34 PM
I guess the two topics thing was an accident. Labels are basically loops that are a little easier to control.

With a Loop it would look like this:
- Loop:
-- Conditional Branch: If Variable:0001 is Greater Than or Equal To 1
--- < Nothing >
-- Else Case:
--- Break Out of Loop
- End Loop:

With Labels it would look like this:
- Label 1:
-- Conditional Branch: If Variable:0001 is Greater Than or Equal To 1
--- < Nothing >
-- Else Case:
--- Jump to Label 2
- Jump to Label 1:
- Label 2:

They're not completely interchangeable though. You just have to experiment to figure out which one works the best.

Quote
Originally posted by lilsniffs3
You made two topics.

Label is a checkpoint in an event.
Go to label returns the player to the checkpoint.
Title:
Post by: DragonBlaze on October 20, 2007, 12:55:24 AM
Long story short, you put a label somewhere in your code, and then when you want to go back to that segment in your code, use the go to label command.

Though in "good" programming, the label and goto label should never be used. Then again, in rm2k3 there are no methods, classes, or objects or anything like that, so sometimes your better off using it.
Title:
Post by: Ganocide_of_a_Kingdom on October 20, 2007, 02:40:56 PM
I find Labels useful. It gives you more control over yer code in my opinion. Loops are okay, but not that easy to control. I find labels much flexible to work with, specially with a CMS. I used to use loops for CMS' but then I found labels and changed over to them.  :firefox: