View Single Post
Old March 7th, 2013 (3:02 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
    Join Date: Nov 2012
    Location: Do you really want to know? Really?
    Gender: Male
    Nature: Bold
    Posts: 1,766
    Originally Posted by Crocky View Post
    Are scripts that do things after a certain amount of steps possible to do in Firered?
    I wanted to make berry trees that regenerate a berry after a certain amount of steps.
    Thanks for your help!
    Errr... It would be tough, but it could be done. It would require a small branch in the step routine, but it is fairly basic ASM in terms of complexity. It can't be done with just a script because scripts lock the player in place. The only way to do it with a script, would be to have a map script which checks the amount of steps since the last time it was used and if so, cause berries to grow. The only problem with this, is the scripts would only be loaded when reentering the map.

    Now that I think about it... I have a vague memory of seeing a note in JPAN's hacked engine that said you could have a script run every step. But I'm not sure. In that case, you could designate a var, and add 1 to it each time. When it hits the number of steps you like, it is reset and berries grow.

    Paired with Simba