Counting steps inside a region

Status
Not open for further replies.

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
I have been wondering if there is a way to count steps while inside a region and have certain events occur once you have walked a specific number of steps inside the region? I also want to turn the step counter at zero if the player leaves the region.
 
Last edited by a moderator:

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
Oh! That's a good idea for a script!

/me follows thread.
 

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
I take that answer ,as a no. So as it seems I need a script for something like this....
 

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
Yes, either that or an insanely complicated Parellel Process.

Edit: Well, with a few variables, and Get Location Info, it could be done.
 
Last edited by a moderator:

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
Okay I will add it to the Script request, since I am planning on having many events occur in a similar way...
 

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
In general, Scripts tend to cause less lag than a Parallel Process that does the same thing. (Or maybe i'm making all mine wrong :p )
 

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
Well Parallel process is for Background music and Screen effects.. on all other cases it makes the game laggy...(or that is my case at least)
 

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
I think it would lag more because the event is always updating, whereas the Script is put into the regular game updating. (Probably..)
 

Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
155
Reaction score
260
First Language
Portuguese
Below this in the "Game_Party" script:

def increase_steps @steps += 1you could add this:
Code:
if $game_player.region_id == 1      $game_variables[1] +=1    else      $game_variables[1] = 0      end  end
    so variable 1 would get +1 every time you make a step on region 1 and reset when the player leave it. You can assign multiple variables to multiple regions and remove the "else" if you don't want it to reset.
 
Last edited by a moderator:

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,760
Reaction score
10,884
First Language
English
Primarily Uses
N/A
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top