View Single Post
  #7978    
Old March 7th, 2013, 03:02 PM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
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