Hey guys, I have a question.
Right now, I'm not using a plugin to zoom in and out of a particular area/character/scene. What I am using is this:
var xPos = $gameMap.event(5).screenX();
var yPos = $gameMap.event(5).screenY();
$gameScreen.startZoom(xPos, yPos, 1.5, 20);
And, I am using this one to zoom out:
$gameScreen.clearZoom();
My question (and problem) is: How do I zoom out slowly? At the moment, when I zoom out, it does so immediately and it's kind of jarring. So, is there a code out there, or something I can add to the code I am already using, to make that possible?
Also, I am not sure if it is an issue with the editor itself or the code I am using, but when zooming in, I see a line of pixels above one of the sprites. Is that supposed to be normal given the code I am using (considering there is nothing wrong with the sprite of that event/character?
Thank you for any help or feedback you may give me.
JavaScript questions that don't deserve their own thread
● ARCHIVED · READ-ONLY
-
-
@IAmVianca Here is what I use :
// Zoom-In
px = $gamePlayer.screenX();
py = $gamePlayer.screenY() + (48 * 3);
$gameScreen.startZoom(px, py, 2.0, 120)
// Zoom-Out
px = $gamePlayer.screenX();
py = $gamePlayer.screenY() + (48 * 3);
$gameScreen.startZoom(px, py, 1.0, 120)
You were basically there. The third argument is scale, and all you need to do is return it to 1.0 to zoom out. -
Hello people!
I'm using a script call to move the player to a certain position:
$gameTemp.setDestination(x, y);
but I would want to avoid another possible action until the player gets to the destination. The same as the "wait" option you can use in movement routes.
Is that possible?
Thank you -
@gizzmito If you are in an event, you can use the following :
SpoilerCode:◆Loop ◆If:Script:$gamePlayer._realX == $gameTemp._destinationX && $gamePlayer._realY == $gameTemp._destinationY ◆Break Loop ◆ :End ◆Wait:1 frame ◆ :Repeat Above -
@gizzmito If you are in an event, you can use the following :
Spoiler◆Loop
◆If:Script:$gamePlayer._realX == $gameTemp._destinationX && $gamePlayer._realY == $gameTemp._destinationY
◆Break Loop
◆
:End
◆Wait:1 frame
◆
:Repeat Above
Thank you, that was fast!
But unfortunately I have tried and it doesn't work.
If I put something in the same event, the movement stops (well, the player doesn't move at all). So the condition never is true and the game freezes.
It's the same reason I can't put "wait" in the line below "$gameTemp.setDestination(x, y)" because the "wait" order is executed and the "$gameTemp.setDestination(x, y)" doesn't work. -
@gizzmito Here is a plugin that will do what you are after.
Exhydra Character Control - Set Destination Ex
// destinationX - The destination x coordinate
// destinationY - The destination y coordinate
// direction - The direction to face upon reaching the destination
$gamePlayer.setDestinationEx(destinationX, destinationY, direction);
You can use it with $gamePlayer or even events ($gameMap.event(eventId)). With this you can use the loop pause I posted above without an issue. -
-
@IAmVianca Here is what I use :
// Zoom-In
px = $gamePlayer.screenX();
py = $gamePlayer.screenY() + (48 * 3);
$gameScreen.startZoom(px, py, 2.0, 120)
// Zoom-Out
px = $gamePlayer.screenX();
py = $gamePlayer.screenY() + (48 * 3);
$gameScreen.startZoom(px, py, 1.0, 120)
You were basically there. The third argument is scale, and all you need to do is return it to 1.0 to zoom out.
Thanks for the help!!! :) -
I'd like to ask if possible how you can get access to the value of something in your plugin, from inside RPG Maker MV.
I have "$gameTemp._bchainData[16]" with a number value, but I'd like to be able to check its value in an action sequence (Via Yanfly Plugins).
I tried looking at other plugins for reference but couldn't find any example that allowed me to figure this out,
so I'd really appreciate if anyone can let me know what I'd need to do for this. -
A question... Theres some way to check in damage formula if the skill will hit a allied or a enemy?
Aka: If hit allied do X, else do Y.
Thanks -
Hmmm... I'm am unsure if this belong here but I have at least one thing I need help with, in which it requires Yanfly's Buff's and State Core and some other of their plugins.
1. I am trying to create a state/buff in which it boosts a parameter based on the remaining HP the user has but I want to use lunatic mode to accomplish this.
This can go in multiple ways: one, is to multiply the remaining HP with a percentage of the parameter that is being buffed, or two, when the user is at a certain HP percentage, it boosts a static percentage. -
How do you exactly read something like this:
<Action Stat + x>
<Action Bump (User): x>
as a regular expression. I want to detect the User and X as a variable by the way. -
Is there a way to implement something along the lines of:
$gameActors.actor(1).forgetSkill(1051.. 1055)
? -
@Lear You could try something like the following :
Code:[1051,1052,1053,1054,1055].forEach(function(id) { $gameActors.actor(1).forgetSkill(id) } ); -
How do you exactly read something like this:
<Action Stat + x>
<Action Bump (User): x>
as a regular expression. I want to detect the User and X as a variable by the way.
Check out the DataManager functions for Yanfly plugins that use that format. -
I'm looking to use a script call to fade out to white, but remain in the same map.
-
@sundricat The following should work :
Code:// Fade Out SceneManager._scene.startFadeOut(duration, booleanWhite); // Fade Out to Black SceneManager._scene.startFadeOut(60, false); // Fade Out to White SceneManager._scene.startFadeOut(60, true); // Fade In SceneManager._scene.startFadeIn(duration, booleanWhite); // Fade In from Black SceneManager._scene.startFadeIn(60, false); // Fade In from White SceneManager._scene.startFadeIn(60, true); -
What'd be a way to check a skill'suser? I'm using all of Yanfly's current up to date plugins at the moment as an FYI. I am trying to do a
<Before Eval> that checks if the user is an actor or an enemy. What I've tried is something like this to test
<Before Eval>
if (user.isActor) {
$gameMessage.setBackground(1);
$gameMessage.setPositionType(0);
$gameMessage.add("\\c[6]I AM AN ACTOR!\\c[0] ");
} else {
$gameMessage.setBackground(1);
$gameMessage.setPositionType(0);
$gameMessage.add("\\c[2]I AM AN ENEMY!\\c[0] ");
}
</Before Eval>
However even though an enemy is using the skill only the first part actually happens (where what I want in this scenario is the second message
of "I AM AN ENEMY" to pop up). Any help would be greatly appreciated! :D :D :D
EDIT: Figured it out from a friend! Couldn't delete the post -
Yanfly redirected me here with regards to this question and I feel it's a small enough thing that it does not warrant a thread.
Is there a way to get the max limit of weapons and/or armor from Item Core for eval purposes? Like say you have 50/50 weapons already and you found a treasure chest with a sword in it, it will check if current weapon count >= max weapon limit?
I'm aware that you can intentionally get more than the max limit, I'm just curious if it's possible to put the max weapon limit for conditional purposes? -
I want to get the actual screen x and y of a specific event. How would I go on that? Since $gameMap._events[1]._x or _realX just shows me the x and y from the editor...not the actual screen.