The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: Mortar on October 28, 2007, 01:52:10 PM

Title: [RESOLVED]10 logs
Post by: Mortar on October 28, 2007, 01:52:10 PM
In my game, I want the character to collect 10 logs. So far, everything is done correctly except for one thing: I can only make the player need 1 log to move to the next map, instead of 10.

Is there a way to make the player need 10 logs instead of 1 to move to the next map? I'm using a conditional branch for this.

Thanks in advance,

Mortar.
Title: Re: 10 logs
Post by: Reives on October 28, 2007, 04:10:12 PM
Name a spare variable log #, initialize to 0 if needed.
Every time you pick up a log, add 1 to log #. When checking with conditional branch, simply check if the log # variable is > 10.


And if you don't want to do the variable way, here's a more advanced way that might help you learn the use of loops that would be useful elsewhere:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv385%2FReivier%2FLoop.jpg&hash=fa78265ea87d6ae36bf418e3541f834eb3525a03)
Title: Re: 10 logs
Post by: Mortar on October 28, 2007, 06:13:04 PM
Thanks a lot man. ;D