Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How do one make a "wait" and "wait until movement".

Wait: there's a variable called "@wait_frames" or something like that, just increase it:
Code:
@wait_frames += 20

and sorry, i forgot completely about the move lists...
 
It pauses the interpreter, I believe. As the interpreter would update, it would check the variable and wait, although, due to the fact that it is an instance variable, in no possible way could it work. However:
You can find a great deal of the eventing commands hidden in the "Interpreter" sections of your Script Editor.

So, you could, in essence, find the method for waiting, and be finished with it. Also, there's a chance it could be #Interpreter->wait_frames or such. Then the other idea is possible.

Hope I've been helpful!
 
I doný think that will work.
What I'm trying to do is something like:

move character RIGHT, WAIT 5 seconds (of frames, whatever), and the move my character LEFT.

The thing is that when i do this is rgss, the computer does the last command; the first command is ignored; and the character moves only to the left.

how can i make the script WAIT (lag) for some time?
 
In all honestly, sleep isn't your best choice. I actually recommend adding this to your scene.

Code:
class Scene_YOURSCENENAME
  attr_acceessor :wait
  alias_method :seph_waitthingy_scnwhatever_update, :update
  def update
    if @wait > 0
      @wait -= 1
      return
    end
    seph_waitthingy_scnwhatever_update
  end
end

Change Scene_YOURSCENENAME to whatever scene you are using (If you are using the map, it would be Scene_Map).

Then, you can use:
Code:
$scene.wait = n

That will make it delay x frames. Make sure this is below all your scripts though.


The wait until move completes is a little trickier. I will look and see what I can't do.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top