(Action RPG) Version 0.017 Hold/Drop Objects
Ok, so adding the fire button to drop the objects wasn't as difficult as I feared. Just make sure the latches on the fire buttons are turned off, and add a counter on the frames. Incrementing it (up to FF but no wrapping) when it detects the button is pressed, and taking an action when the button is released based on the counter. If >= SomeValue, then drop the object, otherwise assume the player wanted to use the currently equipped item.
Equipped items don't work yet obviously. So pressing the button quickly just results in no action.
The current value is set to 60, for roughly 1 second in NTSC types. Later on when I actually consider PAL systems, I'll be setting up the constants file to compile with different settings based on what type of system it's being compiled for. So for a pal system the value would be roughly 50 instead.
Sadly, there are no sound effects yet.
So you won't know if you successfully dropped the item until you try to move away from it after releasing the button.
Additionally I noticed that sometimes the gate won't open when touched. I'm not sure exactly what causes this, other than it only happens when it's flickering. Based on the flickering colors of the player, there's some wastage going on - you can see the default blue color flashing in between the black and heart colors. This means no object at all was selected for that frame. Still, there are frames when the key IS on the screen. And the gate is never blinking... so it -should- respond anyway.
I'll worry about that in the next version. If you notice that happening, just pick up the hearts in the room first and try again. ![]()

2 Comments
Recommended Comments