Hi, I'm currently making a puzzle game and on one level the player has to dodge the attacks from enemies and being hit in total of 5 times will result in game over. In most video games when being attacked character will blink for a few seconds and be unable to receive damage so the player can reposition themself. How can I do this in rpg maker?
How can I make character blink?
RPG Maker MV SupportYou can use an event to set a movement route on the player which turns them transparent, waits a few frames, turns transparent off, repeat a couple of times.
SRD, aka SumRndmDde has a plugin for this. You just make the faces on the top row, and the blinking daces on the bottom row.
Every few second, it will shortly show the blinking dace and then go straight back to the normal face.
Edit: im on my phone, so I dont have a link. Google should be able to help you from here. 😛
Every few second, it will shortly show the blinking dace and then go straight back to the normal face.
Edit: im on my phone, so I dont have a link. Google should be able to help you from here. 😛
Alright, so for clarification the term is Invincibility Frames.
as "making a sprite blink" can be read as you wanting them to actually close-open their eyes, which is doable so you will get off-topic replies about that 😅
Anyways we need 2 parts the appear-dissapear visual part, which would be the "blinking" and the logic to turn it off.
You want to retain player movement while the invul. lasts so we would need this to be processed as a parallel type event.
first we setup a switch to turn on the invulnerability loop we also need a variable to count the number of frames this will last so the player gets back to their normal hit-able status.
EDIT: forgot to add a <set movement route: Through OFF> on the else part after the loop breaks for the player, or else the player will keep phasing through stuff 😅
as "making a sprite blink" can be read as you wanting them to actually close-open their eyes, which is doable so you will get off-topic replies about that 😅
Anyways we need 2 parts the appear-dissapear visual part, which would be the "blinking" and the logic to turn it off.
You want to retain player movement while the invul. lasts so we would need this to be processed as a parallel type event.
first we setup a switch to turn on the invulnerability loop we also need a variable to count the number of frames this will last so the player gets back to their normal hit-able status.
- when the player gets hit by an event, lets say one of those fireball spitting walls the event (by touching the player) should delete itself and activate the "iframe" switch.
- the iframe switch is the condition to activate the parallel which consists of a loop:
- this will make the player "blink" 3 times per second (frame) for 4 frames then turn off itself and reset the variable.
EDIT: forgot to add a <set movement route: Through OFF> on the else part after the loop breaks for the player, or else the player will keep phasing through stuff 😅
I find a way to be able to do it now! Thanks a lot, everyone. Even though BK-tdm method didn't work as planned because the character can't move when being set in the movement route command even in parallel event your comment gave me an idea to adapt. Basically the switch is turned on after the enemy attacks and then I create the blank event page in the enemy event so the variable won't count up while the character is blinking and will return to the hittable state again when the switch is turned off.
Make sure the moveroute is not set to "wait for completion" when using my example as that will pause stuff even if parallel 😅
Oh... i thought you ment blinking as close their eyes for like 10th of a second.
I don't have MV/MZ installed to check it, but there's a hide target function in VXA animation editor.
You can use this to make a blink, and basically just play animation on the character. Although if you need to change the frame speed, you need a plugin to do that.
You can use this to make a blink, and basically just play animation on the character. Although if you need to change the frame speed, you need a plugin to do that.
Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-character-blink.165477/