Thanks.
You mean in your own script? It's really easy:
or
are the x and y coordinates if your windows. Simply add or substract from them. Do this in a loop do, or check for a class variable (it's true when moving, false when not moving) in the update method, and if it's true, let it move. Please remember to dispose your windows when they're out of the screen.
I haven't tested this, but it should work.
class Scene_Test
def initialize(index = 0, return_to = Scene_Map)
@index = index
@return_to = return_to
end
def main
@window = Window_Command.new(250, ['Quit'])
@window.x = -@window.width
Graphics.transition
#Set window
loop do
@window.x += 3
Graphics.update
break if @window.x >= 0
end
@window.x = 0 #Fix position
loop do
Graphics.update
Input.update
update
break if $scene != self
end
@window.dispose
end
def update
if @window.active
@window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = return_to.new
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
case @window.index
when 0
$scene = nil
end
end
end
end
end
Yeah, IK. I typed it in Opera really quickly...
EDIT: Lol. So many mistakes. I'm fixing them now.
EDIT: Fixed.
the graphics slider by Kread-Ex is great foe this thing.
www.rpgrevolution.com/forums/index.php?showtopic=41667&hl=graphics+slider
Fantasist made a good script for this that was easy to implement into any scene. It's called "Moving Windows" or something like that.
Quote from: ForeverZero on July 08, 2010, 09:28:52 pm
Fantasist made a good script for this that was easy to implement into any scene. It's called "Moving Windows" or something like that.
I agree with your suggestion. Here's a link to the topic:
http://forum.chaos-project.com/index.php?topic=83.0
(Now you have no excuse to be lazy and not use it. ;))
to check if moving.
So your new result for the update method, where everything is only updated if not moving, will be:
def update
@window.update
if !@window.moving?
#Update
end
end
This is because the moving is included in the update method. Unless something else is included in the update method, like in Window_Command, you should use this. But if you manually added something in your own window's update method or used Window_Command, this is your new code:
def update
if @window.moving?
@window.move_wins
else
#Update
end
end
EDIT: Duh. Nvm.
loop do
@window.move_wins
end
Oh yeah, duh *slaps himself*.
loop do
@window.move_wins
Graphics.update
end
EDIT: I hate myself! Fixed!
@actor_command_window.move(@actor_index*160, 480)
loop do
@actor_command_window.move_wins
Graphics.update
break if !@actor_command_window.moving?
end
@actor_command_window.move(640, 480)
loop do
@actor_command_window.move_wins
Graphics.update
break if !@actor_command_window.moving?
end
etc.