Hyperly

i like rocks
Veteran
Joined
Jun 25, 2016
Messages
72
Reaction score
11
First Language
English
Primarily Uses
RMXP
VXAce uses this and it seems to work for them " wait($game_variables[1]) "
whatabout for XP? I get a syntax error everytime I do that.
Also how would I be able to open the console if there is one for XP?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
378
Reaction score
148
First Language
English
Primarily Uses
RMXP
In XP, the wait command is handled this way:
Code:
  #--------------------------------------------------------------------------
  # * Wait
  #--------------------------------------------------------------------------
  def command_106
    # Set wait count
    @wait_count = @parameters[0] * 2
    # Continue
    return true
  end
So using the script call
Code:
@wait_count = YOUR_NUMBER_HERE
will be the VXA equivalent.

XP doesn't have a native console either. I use this script for that:
 

Hyperly

i like rocks
Veteran
Joined
Jun 25, 2016
Messages
72
Reaction score
11
First Language
English
Primarily Uses
RMXP
You have managed to save my life and mainly time in both threads, at first I thought wait_count was something completely different so I ignored it this looks so much easier than the other solutions I've seen thank you. Now I can make a light path that randomly lights up and also darkens as you step on it.
EDIT:
Oops one last thing I really should've mentioned or asked. Is there a way to control variables inside of a Move Route? If not I might have an alternative, just wondering.
 
Last edited:

Hyperly

i like rocks
Veteran
Joined
Jun 25, 2016
Messages
72
Reaction score
11
First Language
English
Primarily Uses
RMXP
Move routes have the option to use scripts in them, however the script does nothing when inside the move route, but when I put it outside it works perfectly. Do move routes handle scripts differently?
New EDIT:
The print statement runs like right as the game starts, instead of waiting a few frames. But if I did this outside of the Autonomous move route it works fine. Only problem is I need to do this inside of a Move Route because i'm relying on a Player Touch event and it won't automatically animate. For reasons related to a different thread I can't use Parallel Process on this event.
Ruby:
@wait_count = 20*2
print("Finished waiting")
EDIT2:
I actually had it as _count not _time sorry
 
Last edited:

Hyperly

i like rocks
Veteran
Joined
Jun 25, 2016
Messages
72
Reaction score
11
First Language
English
Primarily Uses
RMXP
I guess @wait_count is completely ignored inside RMXP Move Routes so I decided to do this
but it doesn't look how I hoped it would, so I'll just stick with what I can. For those coming from the other thread I've been trying to make the light tiles (they aren't actually tiles) light up randomly in the room and slowly flicker.
Ruby:
@move_frequency = rand(5) + 1
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
378
Reaction score
148
First Language
English
Primarily Uses
RMXP
Is there a way to control variables inside of a Move Route?
Code:
$game_variables[ID] = whatever_you_want
Obviously replacing the ID accordingly.
Move routes have the option to use scripts in them, however the script does nothing when inside the move route, but when I put it outside it works perfectly. Do move routes handle scripts differently?
Move route commands are handled in the Game_Character class (see Game_Character 2 script). Here's how the wait command in a move route works:
Code:
      # If waiting
      if command.code == 15
        # Set wait count
        @wait_count = command.parameters[0] * 2 - 1
        @move_route_index += 1
        return
      end
Game_Character does use @wait_count, but it also calls 'return' afterwards. Meanwhile a script call doesn't.
Code:
        when 45  # Script
          result = eval(command.parameters[0])
        end
        @move_route_index += 1
What you could do is edit the above to this
Code:
        when 45  # Script
          result = eval(command.parameters[0])
          if result == :return
            @move_route_index += 1
            return
          end
        end
        @move_route_index += 1
And add this snippet to your scripts list:
Code:
class Game_Character
  def wait(frames)
    @wait_count = frames
    :return
  end
end
Now you can do the following script call in the move route:
Code:
wait($game_variables[ID])
 

Hyperly

i like rocks
Veteran
Joined
Jun 25, 2016
Messages
72
Reaction score
11
First Language
English
Primarily Uses
RMXP
This overall solved everything and actually helped even more than I thought it could, you even showed me how to make a little script snippet that uses an already existing class which is something I probably would've asked about in the future. Thanks a lot.

wy0Jppt.gif
 

Latest Threads

Latest Profile Posts

Creating 3D CGs for Cutscenes. :kaosalute:

I keep wanting to post every song I make for the game and have to hold back on that because at this rate, I'll have spoiled all the really good stuff lol..
DerniBorges wrote on TSR's profile.
Is there any way this plugin works with the big character, and the QSprite plugin? Using RTP chars, everything works fine, but the big ones, with QSprite, it's like that in the image, it doesn't reflect right. And there is, in the settings, an option to fix it. Thanks.
bug2.png
Bengawan Solo with fantasy style arrangement. :D
So I just got my computer back (Was posting stuff on my phone) But now my dang monitor's broken! I'll need to get a new one, which means... JOBS! Yaaay... When I get a new monitor, I'll post picture of one of my RPGMMV projects.
Wish me luck... :kaodes:

Forum statistics

Threads
115,898
Messages
1,093,803
Members
151,142
Latest member
mrneptune72
Top