RPG Maker Forums

What happens (I walk up to press the event)


What is in the event I press: animatedimages(-110, -125, "FemaleMed", 1, 24)


What does that do? animatedimages(x position, y position, Graphics/Pictures/(Location)/1.png, looping?, frames in folder)


What do you mean black screen? Look below at the gif.





The code:


Why the whole code? I don't know where the error is happening.


class Scene_DataHolder < Scene_Base

def prepare(x, y, path, loop, frames)
@window_x = x
@window_y = y
@path = path
@loop = loop
@frames = frames
@newframes = 1
@rect = Rect.new(@window_x, @window_y, 0, 0)
@image = Sprite.new
create_background
create_window
end

def update
Graphics.wait(10)
@newframes += 1
if @newframes != @frames
@image.bitmap.clear
@image.bitmap.clear_rect(@rect)
create_window
end
else if @newframes == @frames
if @loop == 1
resetframes
end
else if @loop == 0
SceneManager.return if $frames == 0
end
end
end

def resetframes
@newframes = 1
update
end

def create_background
@background_sprite = Sprite.new
@background_sprite.bitmap = SceneManager.background_bitmap
end

def create_window
@rect.set(@window_x, @window_y, 0, 0)
@image.bitmap = Bitmap.new("Graphics/Pictures/" + @path + "/" + @newframes.to_s + ".png")
end
end

class Game_Interpreter
def animatedimages(x, y, path, loop, frames)
SceneManager.call(Scene_DataHolder)
SceneManager.scene.prepare(x, y, path, loop, frames)
end
end


Code updated

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top