RMMZ Moving an event or the player by a certain amount of pixels

McSundae

Regular
Regular
Joined
Oct 28, 2015
Messages
222
Reaction score
223
First Language
German
I was experimenting with an plugin to cause the player to bounce away from an onMap enemy like you know it from SNES or Gameboy Zelda Titles.

I used $gamePlayer._x to alternate the position of the sprite which actually worked, but it let me bounce into walls and if you enter a float value to just bounce a quarter tile for example the player controller seems not to know where he currently is and you are not able to walk any longer.

Anyone got an idea how to alternate position without getting stuck between tiles? Maybe there is even an plugin that i just didn't found to do the trick
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,637
Reaction score
11,137
First Language
English
Primarily Uses
RMMV
It would be helpful if you showed your event that wasn't working, we could offer help.

If I change $gamePlayer._x and then change it back (to make the player bounce then go back), it moves perfectly fine afterward.
 

McSundae

Regular
Regular
Joined
Oct 28, 2015
Messages
222
Reaction score
223
First Language
German
Yes, you are right. Sadly i don't want to bounce back, i just want to bounce away when the player is hit by enemy or the enemy is hit by the player.

Moving the player or event by an integer number doesn't lead to any issues, but when i add for example $gamePlayer._x += 0.2 the player gets stuck between two fields and isn't able to move anylonger.
 

Latest Threads

Latest Posts

Latest Profile Posts

Some people shouldn't be parents. Someone put their toddler in the hallway of the apartment building I live in at 11 p.m.... and let her wander. The heck is wrong with people?!
Twitch! Strean is currently live with some more gamedev! Feel free to drop by~
If you need some maps done, but don't like mapping or just want to focus on other areas of your gamedev, my workshop is alway open! Hit me up!
Someone leaked the GTA VI trailer, so Rockstar just put it out today. Let the hype period truly begin!!!
Not surprising, but I've basically forgotten everything about Cubase. Guess I'm looking up beginner's tutorials again... :kaodes:

Forum statistics

Threads
136,750
Messages
1,269,538
Members
180,493
Latest member
Ash_Konelle
Top