Zoom events, the player and follower sprites!
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 the map. 0 = Your player. -1 = Follower 1. -2 = Follower 2. -3 = Follower 3. NOTE: If no ID is passed to the script, the default ID is 0 (i.e.: the player). **ZOOM is a percentage** 1 equates to 100%. 0.5 to 50% (half the size). 2 to 200% (double the size).
NOTE: Negative zoom values flip the sprite on its axes; the default x-axis is the sprite's centre, and the default y-axis is the sprite's bottom.
The duration value allows you to create a zoom animation over-time. It can be an integer that is 0 or higher.
When only one 'zoom' value is specified, it assumes both the x and y dimensions will be zoomed proportionally. The same can be said for duration.
You can specify separate zoom behaviours (zoom and duration) for each direction by passing in additional arguments.
SpriteZoom.zoom(); The code above will reset the player to 100% original size in 0 frames. SpriteZoom.zoom(0, 2, 120); The code above will zoom the player 200% in 120 frames. SpriteZoom.zoom(-2, .5, 30, 1); The code above will shrink follower 2's width by 50%, while maintaining their height over the coarse of 30 frames. SpriteZoom.zoom(23, 0, 200, 1.35, 250); The code above will shrink event-23's width to nothing over 200 frames while stretching their height 135% over 120 frames.