Reset steps?

Started by Orici, November 01, 2009, 05:37:28 pm

Previous topic - Next topic

Orici

I'm working on a sytem that makes the player slower after he does a certain amount of steps and then recover speed by resting. I did it this way:
First I set steps to variable 1 in call script ($game_variables[1]=$game_party.steps)
then in a common event,with conditional branch, if varible 1 = 20 , change player speed to 3 and so on
but the problem is i don't know how to set steps back to 0 (tried by setting variable 1 = 0 but i had no luck)

Aqua

$game_party.steps = 0

That'll constantly clear it though when run... so you wouldn't be able to have a step counter :P

Orici

well i don't need a step counter.... it is replaced with a location window  :haha:
but that didn't work: nomethoderror ocurred while running script
                             undefined method 'steps=' for #<game_party:0x141e8b0>

shdwlink1993

So you just want to reset steps? Use Aqua's thing, but add this into a script above Main:

class Game_Party
  attr_accessor :steps
end


It's a small thing, but the error message will be replaced with the steps going to 0 properly.
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Orici

thanks that fixed it
I made up a demo with this.. i'm not sure if it worths to be posted but if someone has some free time please check it and look if i made a mistake with those events  ;)

http://www.4shared.com/file/145529990/9cfa9891/Project1.html