Hudell Character Effects

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Hudell, May 17, 2015.

  1. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,311
    Likes Received:
    2,907
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Hudell Character Effects

    https://github.com/Hudell/scripts/blob/master/standalone/character_effects/character_effects.rb

    This simple script will let you show some effects on the player or on an event.

    There are currently 3 main effects available: shaking, rotating and flashing.

    Shaking:

    $game_player.shakeYou can pass three different parameters to it: offset_x, offset_y and frames.

    offset_x determines how much the character will move horizontally when shaking (Default is 0.3, equivalent to roughly to 10px)

    offset_y determines how much the character will move vertically when shaking (Default is 0.3)

    frames determine how long the character will shake. (Default is 30 frames)

    Flashing:

    $game_player.flash(10)or$game_player.flash_loop(10, 6)The first script call above will flash the player for 10 frames. The second will do the same thing 6 times.

    You can pass additional parameters to change the alpha or the color of the flash, in this order: alpha, red, green, blue. The default is 255 to all of them.

    Rotating:

    $game_player.rotate(360, 60)This script call will rotate the player 360 degrees and it will take 60 frames to complete the rotation.

    You can change the center of the rotation with those two script calls:

    $game_player.origin_x = 20$game_player.origin_y = 10The default origin values are 0, set it to a larger value to move the rotation center right/down, or set it to a larger value to move it left/up.

    If you change the origin, be careful, as the player/event won't trigger collision or other events if any of the origin values is not zero.

    As usual, you're free to use this script on any kind of project you want.
     
    #1
    LynX likes this.
  2. LynX

    LynX Veteran Veteran

    Messages:
    81
    Likes Received:
    7
    Location:
    Poland
    First Language:
    Polish
    $game_player.flash(10 255 255 255 255)


    Hi really nice job ! 
    I have a question how flash with diffrent color ? what would the script call look like ?
    ok i get it, it looks like that:
     

    Code:
    $game_player.flash(10 255 255 255 255)
     
    Last edited by a moderator: Aug 5, 2016
    #2
  3. UndeadGamez

    UndeadGamez Poison Dart Member

    Messages:
    24
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    N/A
    how would i place this into an event and make just the event itself shake for 1 or more seconds?
     
    #3
  4. McCFaith

    McCFaith McCFaith Member

    Messages:
    1
    Likes Received:
    0
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    RMVXA
    Super helpful! I'm new to this kind of thing, but this was pretty simple..! Anyways, when my character is in the middle of the map, it looks like the whole screen is shaking. But being in the corners seem fine and only the character shakes then. Is there a way to fix this or am I stuck with it? Or is there a way to lessen the effect? I'm using:

    $game_player.shake(10, 0, 60)

    I super thank you for the effects!
     
    #4

Share This Page