Change actor zoom/scale and speed according to Y axis?

Discussion in 'JS Plugin Requests' started by Jonath4nC, Mar 29, 2018.

Thread Status:
Not open for further replies.
  1. Jonath4nC

    Jonath4nC Kiwi Veteran

    Messages:
    54
    Likes Received:
    45
    Location:
    New Zealand
    First Language:
    English
    Hi all,

    So there's a really cool script here that allows you to scale actor's and event's size. I want to see if I can give my game a depth perspective, so I'm wondering, is there a way to alter the actor's scale depending on his/her y axis along individual pixels (not by grid)? So the further up the actor is on the map, the smaller he/she gets and the lower the actor is, the larger he/she gets.

    Again, the script is found here - Aramis Sprite Zoom

    I was also thinking that the speed of the actor would appear slower the further away he/she is (take longer to get from one side to the other on the x axis), so I'm wondering if there is also a way to change the actor's speed according to their y axis as well? (I did notice though, when you did this through events, the animation is slower which is not what I want haha. So if the actor could be slower, but keep the same frame-rate?)

    Thanks!
     
    #1
  2. Jonath4nC

    Jonath4nC Kiwi Veteran

    Messages:
    54
    Likes Received:
    45
    Location:
    New Zealand
    First Language:
    English
    bumpty bump?
     
    #2
  3. p0_boy

    p0_boy anti-kumbaya Veteran

    Messages:
    64
    Likes Received:
    26
    Location:
    quezon city
    First Language:
    English
    Primarily Uses:
    RMMV
    @Jonath4nC - I was just pondering this and came across @Aramis-IX 's great plug-in too.

    I wrote this script, which runs in a parallel process (you need a switch to trigger it):

    Code:
    var gp_id = ($gamePlayer._realY + 1) / $dataMap.height;
    if ($gameVariables.value(10) != gp_id) {
        SpriteZoom.zoom(0,gp_id);
        $gamePlayer.setMoveSpeed(Math.round(($gamePlayer._realY + 1) * (6/$dataMap.height)));
        $gameVariables.setValue(10,gp_id);
    };
    
    It needs to be adjusted and tweaked though, depending on the application.

    Animated GIF Example [gfycat.com]

    Ideally, I think it should run within the process that checks if the Up or Down buttons are being pressed. I have no idea though what that is.

    Also, normal size/speed should be in the middle of the map, large/fast on the bottom, and tiny/small at the top (right now it is just normal/fast at the top, medium/average in the middle, small/slow on the bottom). This can be done with adjustments to the equations but I just woke up and need to eat before I tackle this.

    Hope this helps. LMK if you think of any improvements.
     
    Last edited: May 27, 2019
    #3
  4. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,409
    Likes Received:
    4,079
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP
    @p0_boy While it's nice of you to help, the OP hasn't been on here for nearly a year. So I'm going ahead and close this.

    Closing this now. OP, if you want this reopened, please report this post, thanks.

     
    #4
    p0_boy likes this.
Thread Status:
Not open for further replies.

Share This Page