Eventing A Falling Character

Hey everyone I need some help.

I'm currently making a project where one of the characters is falling from the Sky unconsious and I was wondering if any one can suggest the most effective way of eventing this.

Any help would be awesome and appreciated. 🙂
It all depends. It's going to be more in the graphics than eventing, really. You're definitely going to need a graphic of said character that looks like they're falling. I'd just throw that in the center of some kind of animated background (I do believe there's scripts for using animated panoramas, but someone please correct me if I'm wrong on that one), set a wait, and have the background look like it's approaching ground. When it hits the ground, turn the screen white really quickly using screen tint, port over to another map without a screen translation (to make a nice, smooth transfer), and tint the screen back to standard colors with the event in the same position of the screen, exception with a graphic of them laying (like the dead character graphics). Really, there's not too much eventing required for this kind of scene.
Ok Dude Cheers.
Or, if you're wanting to use events, another way you could do it is with pictures. Make cloud graphics, put them in your pictures folder and, if I remember right, using the picture command in events you're able to "zoom" and move pictures. Use this to give them the illusion of moving toward the viewport and flying past it. I'm not sure, however, if you can set images to be below the player level (I do believe they're always on top), which would mean, if you wanted it to look like he's coming up on the ground faster and faster, closer and closer, that you wouldn't be able to have an animated approach to the ground.

Edit: I believe you're able to zoom and move pictures. Since I don't have power, I'm not readily able to check this theory. 😛
Some characters have "downs" that would help, but if I were desperate, here is what I would do:

I'd edit the side view of my character to be on his back, eyes closed.

I'd create a translucent effect around him like air passing around him with a transparent white brush or using one of the water foaming animations charsets as a basis.

Then I'd just have his charset come down from the top of the screen and have the background move to simulate him falling until he hits bottom. The ideas about the screen changes above seem cool. A nice thunk makes sense =]
Edit: I believe you're able to zoom and move pictures. Since I don't have power, I'm not readily able to check this theory.
This works, but I'm challenged by a couple of things. I made a graphic that was a set of clouds that is 640x2400 in size. In a single Autorun event, and using the "Show Picture" command, and setting the y-axis start at -480, the picture appears and covers the screen width. I then made a "Move Picture" command, and set the y-axis to -1750 (approximately 480 pixels from the bottom of the pic) and set the timer to 300ms. When I run the event, the character appears in the center of the screen, and then the picture appears (covering him completely, sadly) but then it pans all the way to the bottom, as you mention.

My only remaining challenge seems to be how to edit the character to be above the clouds, and then, how to make it look like he is moving. I'm guessing it's possible, and that once he's on top of the map, a simple edit of the sprite's "move path" should make him look like he's flailing around.

Edit: I'm attaching both my cloudfall.jpg image, and the screenshot of the event, for reference. (The instructions are here, and the image is in the spoiler tag, below.)

[IMG]http://i.imgur.com/p04Iw.jpg[/IMG]

Spoiler
[IMG]http://i.imgur.com/SpByW.jpg[/IMG]
You might want to lower the cloud opacity. If my power is back on, when I get home I can slap together an example project. It'll be quite a few hours before I will be, though.
You might want to lower the cloud opacity. If my power is back on, when I get home I can slap together an example project. It'll be quite a few hours before I will be, though.
That works, to a point. The image does work a lot better now, as I lowered the opacity to 120 (make sure it's on both event lines, or your character will slowly disappear over the time the image pans) and now, both the character and the clouds look translucent. I used search and found this thread, which seems to note that placing a picture below a character might be a script requirement. I'm still searching, however, as there must be some way of doing this. (Even the video demo for RPGMakerAce, on YouTube, shows something like this in the opening scene!)
Is there a Z-level or Z-pos option for pictures in events? If not directly through the eventing screen, is there one in the script? You might be able to manually type in the picture event into the script option of the event.
Is there a Z-level or Z-pos option for pictures in events? If not directly through the eventing screen, is there one in the script? You might be able to manually type in the picture event into the script option of the event.
I couldn't find one, but the scripting is a bit over my head. (I've only been playing with this software for a couple of weeks.) That being said, I found two scripted code blocks which might help out. The first is Game_Pictures, under "Game Objects", but it's pretty sparse:

Spoiler
Code:
#==============================================================================
# ** Game_Pictures
#------------------------------------------------------------------------------
# This is a wrapper for a picture array. This class is used within the
# Game_Screen class. Map screen pictures and battle screen pictures are
# handled separately.
#==============================================================================

class Game_Pictures
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@data = []
end
#--------------------------------------------------------------------------
# * Get Picture
#--------------------------------------------------------------------------
def [](number)
@data[number] ||= Game_Picture.new(number)
end
#--------------------------------------------------------------------------
# * Iterator
#--------------------------------------------------------------------------
def each
@data.compact.each {|picture| yield picture } if block_given?
end
end
The second one looks more promising, as it does mention something of the "z" value you're looking for. Although, if I understand enough, I think it might be referencing some other block of code...

Spoiler
Code:
#==============================================================================
# ** Sprite_Picture
#------------------------------------------------------------------------------
# This sprite is used to display pictures. It observes an instance of the
# Game_Picture class and automatically changes sprite states.
#==============================================================================
class Sprite_Picture < Sprite
#--------------------------------------------------------------------------
# * Object Initialization
#	 picture : Game_Picture
#--------------------------------------------------------------------------
def initialize(viewport, picture)
super(viewport)
@picture = picture
update
end
#--------------------------------------------------------------------------
# * Free
#--------------------------------------------------------------------------
def dispose
bitmap.dispose if bitmap
super
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_bitmap
update_origin
update_position
update_zoom
update_other
end
#--------------------------------------------------------------------------
# * Update Transfer Origin Bitmap
#--------------------------------------------------------------------------
def update_bitmap
if @picture.name.empty?
	 self.bitmap = nil
else
	 self.bitmap = Cache.picture(@picture.name)
end
end
#--------------------------------------------------------------------------
# * Update Origin
#--------------------------------------------------------------------------
def update_origin
if @picture.origin == 0
	 self.ox = 0
	 self.oy = 0
else
	 self.ox = bitmap.width / 2
	 self.oy = bitmap.height / 2
end
end
#--------------------------------------------------------------------------
# * Update Position
#--------------------------------------------------------------------------
def update_position
self.x = @picture.x
self.y = @picture.y
self.z = @picture.number
end
#--------------------------------------------------------------------------
# * Update Zoom Factor
#--------------------------------------------------------------------------
def update_zoom
self.zoom_x = @picture.zoom_x / 100.0
self.zoom_y = @picture.zoom_y / 100.0
end
#--------------------------------------------------------------------------
# * Update Other
#--------------------------------------------------------------------------
def update_other
self.opacity = @picture.opacity
self.blend_type = @picture.blend_type
self.angle = @picture.angle
self.tone.set(@picture.tone)
end
end
If you can make heads or tails of this, let me know!

Edit: WHOOPS. Panned right over Game_Picture in the same set as Game_Pictures...

Spoiler
Code:
#==============================================================================
# ** Game_Picture
#------------------------------------------------------------------------------
#  This class handles pictures. It is created only when a picture of a specific
# number is required internally for the Game_Pictures class.
#==============================================================================

class Game_Picture
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :number                   # picture index
  attr_reader   :name                     # filename
  attr_reader   :origin                   # starting point
  attr_reader   :x                        # x-coordinate
  attr_reader   :y                        # y-coordinate
  attr_reader   :zoom_x                   # x directional zoom rate
  attr_reader   :zoom_y                   # y directional zoom rate
  attr_reader   :opacity                  # opacity level
  attr_reader   :blend_type               # blend method
  attr_reader   :tone                     # color tone
  attr_reader   :angle                    # rotation angle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(number)
    @number = number
    init_basic
    init_target
    init_tone
    init_rotate
  end
  #--------------------------------------------------------------------------
  # * Initialize Basic Variable
  #--------------------------------------------------------------------------
  def init_basic
    @name = ""
    @origin = @x = @y = 0
    @zoom_x = @zoom_y = 100.0
    @opacity = 255.0
    @blend_type = 1
  end
  #--------------------------------------------------------------------------
  # * Initialize Movement Target
  #--------------------------------------------------------------------------
  def init_target
    @target_x = @x
    @target_y = @y
    @target_zoom_x = @zoom_x
    @target_zoom_y = @zoom_y
    @target_opacity = @opacity
    @duration = 0
  end
  #--------------------------------------------------------------------------
  # * Initialize Color Tone
  #--------------------------------------------------------------------------
  def init_tone
    @tone = Tone.new
    @tone_target = Tone.new
    @tone_duration = 0
  end
  #--------------------------------------------------------------------------
  # * Initialize Rotation
  #--------------------------------------------------------------------------
  def init_rotate
    @angle = 0
    @rotate_speed = 0
  end
  #--------------------------------------------------------------------------
  # * Show Picture
  #--------------------------------------------------------------------------
  def show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
    @name = name
    @origin = origin
    @x = x.to_f
    @y = y.to_f
    @zoom_x = zoom_x.to_f
    @zoom_y = zoom_y.to_f
    @opacity = opacity.to_f
    @blend_type = blend_type
    init_target
    init_tone
    init_rotate
  end
  #--------------------------------------------------------------------------
  # * Move Picture
  #--------------------------------------------------------------------------
  def move(origin, x, y, zoom_x, zoom_y, opacity, blend_type, duration)
    @origin = origin
    @target_x = x.to_f
    @target_y = y.to_f
    @target_zoom_x = zoom_x.to_f
    @target_zoom_y = zoom_y.to_f
    @target_opacity = opacity.to_f
    @blend_type = blend_type
    @duration = duration
  end
  #--------------------------------------------------------------------------
  # * Change Rotation Speed
  #--------------------------------------------------------------------------
  def rotate(speed)
    @rotate_speed = speed
  end
  #--------------------------------------------------------------------------
  # * Start Changing Color Tone
  #--------------------------------------------------------------------------
  def start_tone_change(tone, duration)
    @tone_target = tone.clone
    @tone_duration = duration
    @tone = @tone_target.clone if @tone_duration == 0
  end
  #--------------------------------------------------------------------------
  # * Erase Picture
  #--------------------------------------------------------------------------
  def erase
    @name = ""
    @origin = 0
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_move
    update_tone_change
    update_rotate
  end
  #--------------------------------------------------------------------------
  # * Update Picture Move
  #--------------------------------------------------------------------------
  def update_move
    return if @duration == 0
    d = @duration
    @x = (@x * (d - 1) + @target_x) / d
    @y = (@y * (d - 1) + @target_y) / d
    @zoom_x  = (@zoom_x  * (d - 1) + @target_zoom_x)  / d
    @zoom_y  = (@zoom_y  * (d - 1) + @target_zoom_y)  / d
    @opacity = (@opacity * (d - 1) + @target_opacity) / d
    @duration -= 1
  end
  #--------------------------------------------------------------------------
  # * Update Color Tone Change
  #--------------------------------------------------------------------------
  def update_tone_change
    return if @tone_duration == 0
    d = @tone_duration
    @tone.red   = (@tone.red   * (d - 1) + @tone_target.red)   / d
    @tone.green = (@tone.green * (d - 1) + @tone_target.green) / d
    @tone.blue  = (@tone.blue  * (d - 1) + @tone_target.blue)  / d
    @tone.gray  = (@tone.gray  * (d - 1) + @tone_target.gray)  / d
    @tone_duration -= 1
  end
  #--------------------------------------------------------------------------
  # * Update Rotation
  #--------------------------------------------------------------------------
  def update_rotate
    return if @rotate_speed == 0
    @angle += @rotate_speed / 2.0
    @angle += 360 while @angle < 0
    @angle %= 360
  end
end
This is the section we'd be looking for, as you found:

self.x = @picture.x

self.y = @picture.y

self.z = @picture.number

Z, in most cases (I'm not entirely sure in the case of RPG Maker, though), is the "layer" the image appears on. How I'm assuming this works is Z 1 (maybe 2) is the player Z position, While 0 is the underfoot tile Z position. That means, in order to get the clouds to pass behind the character, the image Z position would have to be 0. It looks like the game orders the Z position of the image by the image index number (which image number it is). Is there any option to change the image number on the image options?

Edit: If so, try changing it to 0 and then testing it.
This is the section we'd be looking for, as you found:

self.x = @picture.x

self.y = @picture.y

self.z = @picture.number

Z, in most cases (I'm not entirely sure in the case of RPG Maker, though), is the "layer" the image appears on. How I'm assuming this works is Z 1 (maybe 2) is the player Z position, While 0 is the underfoot tile Z position. That means, in order to get the clouds to pass behind the character, the image Z position would have to be 0. It looks like the game orders the Z position of the image by the image index number (which image number it is). Is there any option to change the image number on the image options? If so, try changing it to 0 and then testing it.
I just tried, but the image number starts at 1, and won't allow me to save it, even if I change it to 0 manually. I also agree with your analysis, and think there must be somewhere else that assigns the layer on which "self.z" falls.
Well, if you were able to change the z-pos to 0 through a script before it creating the image, then you might be able to pull it off. The reason it probably defaults to 1 is to prevent it from going below the player for what ever reason and 0 being reserved for tiles.
Or you could just set the cloud picture as a panorama and use the parallax scroll feature under map properties. :3
Or you could just set the cloud picture as a panorama and use the panorama scroll feature under map properties. :3
That sounds amazing. Not to nitpick, but my example came with screenshots. (Kinda like a 'how not to', now that I think of it.)

😉

I guess that's my way of saying, "I don't know what you mean (I'm new) but would love to know more about it! Can you help out by pointing me (us) in the right direction?"
Lunarea, the way I'm talking about doing it is entirely different than the style you're talking about which, imo, doesn't look very good. But to each their own, right? 😛 If I had a computer with VXace with me, I'd make a demo of what I was saying 😛
@Genii:

Pano.png


@Link:

Maybe you can create a tutorial for this process. But please try to keep in mind that you're in the support forum, answering questions of someone who is fairly new to the RM scene. Telling them to mess around with Z properties of pictures just to achieve an effect similar (if not the same) as a scrolling panorama is a bit much.

Besides, there are other ways to pretty up the simple scrolling panorama. You can create and move semi-transparent images of clouds, create gusts of wind, etc. 🙂
AH! I didn't get the 'parallax/panorama' connection! (Wow, how silly of me. I'll try this right now!)

Thanks!

Edit: PRETTY! (Is there any way to control the speed of which the pan is occurring? I'm guessing it's in the scripting, but if it's simple, that's all the more awesome.)
Lunarea, I probably will make a tutorial on it since it still seems that people aren't exactly seeing what I'm talking about 😛 Your falling animation is from the side view while mine would be from above 😛 I'll throw a tutorial together about it whenever I get power back at home :3

Edit: And I think, if I remember right, the highlighted 1 is the speed of scroll 😛
Edit: And I think, if I remember right, the highlighted 1 is the speed of scroll 😛
Curse me for not thinking to ask! I was under the impression this might be a 'run for a number of times' variable, but you're right. It is the speed.

Original thread: https://forums.rpgmakerweb.com/threads/eventing-a-falling-character.3034/