Script call for zooming at player x, y?

Status
Not open for further replies.

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,064
Reaction score
1,326
First Language
Swedish
Primarily Uses
RMVXA
Like the title says, I need a script call to zoom into the players x, y location. I'm using this for map transfers since I want that zoom effect before you enter a door. The script call I've been using is this;

$gameScreen.startZoom(x, y, zoom, duration);

The problem for me is with the "x" and "y" values. Even if I enter the x and y of the door the camera seems to zoom in, slightly on the side, and I don't want to manually write in the x and y for each door event anyway. If I can make the script call just zoom into the player (party leader) that could easily be copy pasted though.

I'm aware that there probably is plugins that can do this, but I'd prefer to use a script call if possible.

[EDIT; Might as well ask for another script call as well while I'm at it. I'm also looking for a script call to play an animation on a party follower. I thought that this should do the trick;

$game_player.followers[0].animation_id = 1;

But for for some reason it didn't.]

Anyone?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
$gamePlayer.x and $gamePlayer.y

As for the animation...
Code:
$gamePlayer._followers[0].requestAnimation(id)
I'm not sure how the followers are habdled exactly, can be missing the _
or can be a funxtion call. But I think this is correct.
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,064
Reaction score
1,326
First Language
Swedish
Primarily Uses
RMVXA
@Poryg
Thanks for your reply.

So, for the first question, the script call seems to work (I wrote it like this: $gameScreen.startZoom($gamePlayer.x, $gamePlayer.y, 2, 30); ). But the effect is the same as when I directly entered the coordinates for the door, and the camera zooms in a wee bit north-west of where you'd assume it should. It's weird but maybe this is how MV does it? I have no idea why though, or how to fix it.


Also, the animation script call didn't work at all unfortunately. I do very much appreciate the help though.

[Edit; I managed to get some help with the animation problem by someone named Baz in Studio Blue's Discord. In case anyone else needs to know the solution in the future, here is the correct script call:

this._character = $gamePlayer.followers().follower(0);
this._character.requestAnimation(1);
this.setWaitMode('animation');

I hope this spares someone else the trouble in the future.

Also decided to go with a plugin for the map zoom after all.]
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,838
Reaction score
5,222
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top