Actor Idle Animation Script

Discussion in 'RGSS3 Script Requests' started by Vis_Mage, Mar 29, 2016.

  1. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    372
    Likes Received:
    136
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hello! :)


    I was wondering if someone would be willing to help me with the creation of a character idle animation script? In a sense, I am looking for a simplified version of Galv's Character Animation script, with a few bits of added customization.


    Essentially, I'm looking for the the script to display an idle animation after a set number of frames (I'm looking at 300, but I'd really appreciate if this is customisable so I could fiddle with it).Unlike Galv's script (as well as a similar script from Victor Sant), I'd like to assign the idle animation via the script module, or actor notetag opposed to file name. Something along the lines of <idle: People1, 1, left> as a notetag to set that actor's idle animation to the first sprite group of People1, facing left. Other than that, having the ability to disable idle animations for cut scenes (a switch perhaps, that or disabling it during text boxes would work well too) would be very handy. Although not required, the ability to activate an actor specific common event after so long of idling would be nifty too.


    That pretty much sums up the main gist of what I'm looking for. Don't hesitate to as any questions if I didn't explain anything fully, and thank you for taking the time to read my request! :)
     
    #1
  2. ZServ

    ZServ Veteran Veteran

    Messages:
    247
    Likes Received:
    64
    Don't think you need a script for this, actually. A parallel process *should* do the job.


    if player isnt moving, turn switch on


    if player isnt moving and switch is on, add +1 to variable


    if player isnt moving, what's the value of the variable? if over 300, change character image, set move route shenanigans


    if player presses a key/blahblahblah, set variable to 0, turn switch off, change character image


    Sorry if I wasn't helpful!
     
    #2
  3. MeowFace

    MeowFace Meow Veteran

    Messages:
    1,034
    Likes Received:
    178
    Location:
    La La Land
    First Language:
    Meowish
    What @ZServ said is true, you get to set up a complicated idle animation using eventing alone.


    To be more specific:


    [1] You need a common event on parallel that checks for condition using a script call:


    $game_player.moving?


    So when player is moving, reset variable X to 0 (Control Variable [X] = 0)


    when the player is not moving, Control Variable [X] += 1


    [2] Next have the conditional branch check if Variable [X] is bigger than 300,


    if it's bigger than 300 turn on another switch that runs another set of Common Event set to parallel (Have all your idle animations here).


    if it's smaller than 300, turn the switch off.


    That's all you need to set up the basic idle condition check.


    As for the animations, you can set your party to move around in a circle and do a small chit-chat, or have them jump up and down/move randomly all around the places/pop up balloons, etc etc. The imagination is your limit there and it's much easier than changing the charset sprite. And the party controller script can help you build such scenarios easily:






    Or you can simply change the charset sprite(graphic) of each actor so they start playing the idle animation graphic instead, and have it changed back when you turn off the switch.
     
    #3
    BCj and Vis_Mage like this.
  4. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    372
    Likes Received:
    136
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    A bit late on my part, but thank you for providing such detailed instructions! :D
     
    #4
  5. MeowFace

    MeowFace Meow Veteran

    Messages:
    1,034
    Likes Received:
    178
    Location:
    La La Land
    First Language:
    Meowish
    You're welcome!
     
    #5

Share This Page