Step counter (deleting steps)

Status
Not open for further replies.
Joined
Mar 19, 2012
Messages
1,623
Reaction score
1,106
First Language
English
Primarily Uses
N/A
Ok, so I'm having a lot of trouble with this and I hope you will be able to elp.

I want to limit the number of steps a player can take, and once this number of steps are taken, I want the payer to be able to reset the steps to 0 and start again.

I can get the steps limited using the control variable an linking the to them steps taken, but I cannot seem to reset the steps so the player can continue moving after the reset. I have tried to reset the variable to 0, but it's not working.

I hope someone might be able to help.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I want to limit the number of steps a player can take, and once this number of steps are taken, I want the payer to be able to reset the steps to 0 and start again.
Here is a little something I played around with and I think you might be able to use it to accomplish what you want (see screenshot1).

What I did was used a Conditional Branch: Script: $game_player.moving? inside a parallel process event and added +1 to Test.variable1.  That way it increased each time the player moved.  I then returned the variable to 0 when it becomes greater or equal to a certain number.

Note though that It doesn't seem to be precise and adds more than 1 to the variable when the player moves.  It was increasing the variable in increments of 7 or 8, which I don't understand.  But still, it was a consistent increase (at least in my testing) so I was able to use it to keep track of how many steps the player has taken and then reset it.

There are probably more efficient ways of doing this.  But it might give you something to work with at least until a better answer comes along.

Screenshot1.png
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
no, it's impossible to reset the steps - that wouldn't make sense because the purpose of that access is to get the number of steps since game start, not since last reset.


What you have to do is copy the number of steps since game start into a storage variable, and then calculate the difference between the current count and the count as it was stored at the last reset-time.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
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

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top