[Ace] How do I make a script wait?

Discussion in 'RGSSx Script Support' started by omoney, Jun 28, 2012.

  1. omoney

    omoney Ruby Nooby Veteran

    Messages:
    57
    Likes Received:
    4
    First Language:
    English
    So I have a function that does a whole bunch of stuff and then it transfers the player to another map. After the player is done transferring I need it to do more stuff.

    Right now this is how I am doing it:



    Code:
    def someFunction()
       ~Do something here
       $game_player.reserve_transfer(1, 0, 0, 2)
    
       while $game_player.transfer?
    	  1.times{Fiber.yield}
       end
       ~Continue doing some stuff
    end
    
    If appears to work but the second part of code isn't happening as fast as I'd like i to be. Is there another way to do it?

    Thanks for reading.
     
    Last edited by a moderator: Jun 28, 2012
    #1

Share This Page