Aramis Sprite Zoom

● ARCHIVED · READ-ONLY
Started by Aramis-IX 20 posts View original ↗
  1. Sprite Zoom Version 1.0.0
    by
    Aramis-IX
     ​
    Sprite Zooming.png

    Introduction
    Zoom events, the player and follower sprites! An adaption of Tsukihime's “Character Sprite Zooming” script for Ace.


    Features

    Zoom or shrink a sprite's width and height independently (or uniformly). Zoom animation(s) over time (or instantly).


    How to Use
    Execute the following SCRIPT calls from any event or moveroute (Sprite Zoom does not support plugin commands):

    SpriteZoom.zoom(ID, zoom);
    SpriteZoom.zoom(ID, zoom, duration);
    SpriteZoom.zoom(Id, zoom, duration, zoom_y);
    SpriteZoom.zoom(ID, zoom, duration, zoom_y, duration_y);


    **ID is the ID of the event in question**

         1-9999    =         Event number on map

         0              =         Your player

        -1              =         Follower 1

        -2              =         Follower 2

        -3              =         Follower 3

    **ZOOM is a percentage**

        1 equates to 100%

      0.5 to 50% (half the size)

        2 to 200% (double the size)

    The duration value allows you to create a zoom animation over-time (in frames). It can be an integer that is 0 or higher.

    NOTE: For more detailed information and examples please view the plugin's "help" section in RPGMaker MV.


    Script
    SpriteZoom

    Right-click link and select "Save Link As"

    Dependencies

    None

    FAQ

    Q: Will Plugin Commands be supported eventually?
    A: Perhaps later... I was unable to get Plugin Commands to operate as effectively as Script Calls, so they were removed from the initial release.

    Credit and Thanks
    - Aramis-IX
    - Tsukihime (Hime from HimeWorks.com)


    - Nelderson

    Terms & Conditions

    Free for non-commercial and commercial use.

    Author's Notes
    Unfortunately, I can only provide a limited amount of technical support for this plugin. I'm fairly new to JavaScript and the amount of time I have on hand is fairly restrictive. 
  2. Very good script so far. :) So I don't need to scale graphics manually.
  3. This is probably the most fun plugin I've played with for ages! I can make giant people to crush the nation!! MWHAHAHAHAHAHA!!!
     
    I love it so much I made a funny screenshot!

    Spoiler
    Yeah, I'm pretty sure she can... she's like 3 times as big as them!!  BD Dragonspear 10_12_2015 18_46_21.png
  4. Just what I needed! Works perfectly! Thank you very much!
  5. I also want to say I'm grateful for this as I'm making a point and click adventure game where character scaling is essential.


    Thanks a lot!
  6. I have a request:


    I would like it if there was a script command to zoom the event that the script runs from.


    e.g.                      -4     =     Current Event


    The reason I need this is I'm using an event copy plugin, so my events have varying ID's across maps.
  7. Really cool plug-in that works beautifully, and with no lag or glitchy behavior. Thanks!
  8. ZcheK, you can reference the current event's ID using a bit of code (its pretty simple though). Use this._eventId or this.eventId() in place of the eventId number in the script call. For Example: SpriteZoom.zoom(this._eventIdzoom, duration, zoom_y, duration_y);
  9. ZcheK said:
    I have a request:


    I would like it if there was a script command to zoom the event that the script runs from.


    e.g.                      -4     =     Current Event


    The reason I need this is I'm using an event copy plugin, so my events have varying ID's across maps.



    Let me know if you encounter any problems. 
  10. Aramis-IX said:
    ZcheK, you can reference the current event's ID using a bit of code (its pretty simple though). Use this._eventId or this.eventId() in place of the eventId number in the script call. For Example: SpriteZoom.zoom(this._eventIdzoom, duration, zoom_y, duration_y);

     Both work great, thanks Aramis-IX
  11. I can't seem to get this to work.


    I've tried putting it on the event itself, then on a custom move route, then on a event that controls the cutscene and I can't get the sprite I want to shrink.


    I'm using the code: SpriteZoom.zoom(6, 0.5);


    6 is the event ID I want to shrink the sprite of.


    I am also using the script that zooms in on the characters (which this event is a part of), which is:


    var xPos = $gameMap.event(6).screenX();


    var yPos = $gameMap.event(6).screenY();


    $gameScreen.startZoom(xPos, yPos, 1.5, 20);


    Can someone help me get this working, please?
  12. hey thanks, very nice for xyZ mapping
  13. This doesn't seem to be compatible with Quxios QPathfind plugin, it's an extension of his pixel based movement plugin to calculate move to mouse routes better, any idea how I could get them working together?

    EDIT: NVM he's fixed it in the latest update.
  14. Thanks Aramis for this script, its awesome!

    So I'm thinking of using this as a way to give my game depth. Could there be 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.

    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?)

    ...but of course I understand if you are unable to help out with that. Perhaps there's someone else who might see this and be able to help?
    Anyway, thanks regardless!

    EDIT: That last request is quite different to this script. Perhaps I'll put this as an actual request on the request topic in a few days...
  15. How do I install/Use it? Sorry I am a noob.
  16. It's possible to zoom a map and characters without zooming the parallax background?
  17. I used this plugin on an RPG Maker MZ project. It works. I made a video about it as well.
  18. For seme reason, if you load a savegame without this plugin before, the actors will be transparent.
    To avoid this issue and let the plugin works with old load playtest, you need to change 2 rows

    Line 88 and Line 89
    JavaScript:
    this.scale.x = this._character._zoom_x || 1;
    this.scale.y = this._character._zoom_y || 1;

    And, tadam! It's works!
    Hope It's help! :)
  19. Hello. I have two specific questions:
    1. I'd like to know if it's possible to enter a given actor/event's current zoom level, plus or minus a certain amount, in as the input of the zoom script itself.
    2. I'd like to know if it's possible to tie that same actor/event's zoom level to a variable.

    To crystalize what I'm trying to do, I'll give an example. Say I wanted to make an escape room in my game where the player has a curse inflicted upon them where they shrink a small amount every certain number of seconds and must escape before becoming too small. Instead of simply making a new zoom level for every possible size they could have, it would be better to make it so that I can run one event for every "pulse" of the change that looks at the player's current size and shaves off a small amount of it every time it's run.
    As for the second question, having it tied to a variable would allow me to easily define what the player is and isn't able to do at a given size using switches.

    I don't particularly know any javascript, but I'm willing to learn some to make it work how I envision it.
  20. @PvtRyan96 it might be possible to do what you want if you call it before.

    best it to use a common even and a wait frame during the parallel process.
    in a scriptcall, you can try (as this is for player only, so repeat for party members
    and or followers.
    define a variable x for shrinking and a variable for duration.
    than in a conditional branch, check the zoom part.

    so if you want to shink it every 5 seconds over 60 frames, you event look around

    wait 60 (wait 60 frames (1 second)
    if variable z <= 0 // check if variable z (timer) is lower than equal or lower than 0
    JavaScript:
    SpriteZoom.zoom(0,  $gameVariables.value(x),  60);
    shrink level of variable x over duration of y (you can use flat numbers.
    variable x -= 0.1
    variable z = 5
    else
    variable z -= 1
    end

    as this keep looping, every 5 seconds, the player shringk by 0.1.
    so from 1 to 0.9, 0.8, 0.7, 0.6 etc (which you can make the attack weaker.

    it might not work in battle as there as nothing there, but I'm planning to
    make the plugin to do so, as adding plugin commands to it is already done.