There is a way to change the movement speed of the player when the player consumes an item? My idea is create an item that is an adrenaline syringe, and when the player use it, increase the movement speed for a short period of time.
Change movement speed temporally with an item in MV?
RPG Maker MV Support$gamePlayer.setMoveSpeed(5);
Change 5 to the speed you want.
Change 5 to the speed you want.
Where i put that code? I put it in the notes of the item and it didn´t work, and i made a passive state and put it in the state and didn´t work either.
Notes are just that - notes. You type whatever you want in there for yourself. They don't run code unless you have a plugin which gives you notetags that you can enter for it.
To run script calls, you make an event and on the third tab is a button that says Script.
However, note that what Aqua provided you is not a complete solution (no insult to AquaEcho, just you seem to be at a newer level and need the help). You'll need to run a parallel common event with a variable keeping track of time to set the movement speed back to normal after however long you want.
I got a way to do it. In the item i set this damage formula:
$gameSwitches.setValue(16, true);
Then the item activates this common event.
It works like a want, the thing is, that going that fast makes the player able to ignore collision for a few frames, and can end clipping into an object or going out of bounds.
Instead of waiting 600 frames, you should do what I said above - set a variable and use Wait commands to tick that down (e.g. set a variable to 60, Wait 10, subtract 1).
If you do a map change while your event is in the middle of that 600 frame Wait command, it will reset the count and make it last longer than it should.
It shouldn't, move speed of 5 is the same as what dashing does. Are you combining this and also dashing?
Then just don't make it go that fast. Make it 4.5 or something.
That means i should put wait 10 frames and subtract 1 60 times?
I reduced the speed to 4.7. The speed increase is significant, and you the character don´t clip in objects or go out of bounds.
Instead of putting code inside your damage formula, make your item call a Common Event in the Effects list.
That common event has, for example:
Then you make your parallel common event which has:
That common event has, for example:
Then you make your parallel common event which has:
The first one have to trigger? Like this:
Yeah, i changed to 90.
And the second one is like this.
They are two different common events, no? Because it doesn´t work, probably i´m doing something wrong.
What doesn't work? The player doesn't get faster? The faster doesn't turn off? Just saying "it doesn't work" doesn't mean anything.
Please add a screenshot of your item in the database.
Remember the OP is using ChronoEngine so I bet they're "using" the item through a hotkey. In which case, OP, try calling the common event from the tool event page
Thanks, I don't see that information in their post anywhere.
You should not be activating a switch in your damage formula - that's what the common event is for.
If you're using ChronoEngine and that ignores Common Events in the Effects field, then set it up the way AquaEcho showed you.
If you're using ChronoEngine and that ignores Common Events in the Effects field, then set it up the way AquaEcho showed you.
Yes, i did what he said and it works too, and is better, because the other way a number 0 appear over the player, indicating that that deals 0 damage, and that would be a bit weird. But now that doesn´t happen.
Thank you, your solution is a better one than mine.
I'm glad it works! For future tips:
- It's best not to shoehorn stuff into the damage formula if you don't have to
- When you start a help thread, tell us what plugins you're using, especially if it's something like Chrono Engine that makes regular parts of the game not work
Good luck with your project.
- It's best not to shoehorn stuff into the damage formula if you don't have to
- When you start a help thread, tell us what plugins you're using, especially if it's something like Chrono Engine that makes regular parts of the game not work
Good luck with your project.
Just a side note, that is likely a problem with some of the plugins you're using. My dashing speed for when I'm testing things is 4 times as fast as that and I've never noticed it behaving strangely.
The OP didn't say it but he's using CrossEngine which is a combination of Chrono Engine and Altimit Pixel Movement. If you go over 5 speed you can clip through the collision boundaries in Altimit.
What OP means?
Also, i didn´t know that. That means even changin speed to the regular 6 in the editor would cause that issue?
Original thread: https://forums.rpgmakerweb.com/threads/change-movement-speed-temporally-with-an-item-in-mv.161555/