So a while ago, I made
a post about using LunaDLL to force powerups. Since I can't commit to anything, it's been a while and I'm just now continuing research (didn't help that when I found out about LunaLua, it wasn't letting me download it).
It was dumb. I hadn't heard of LunaLua.
LL has made it much easier to do what I was trying to do; I have now given the player the ability to pick up an ice flower at will by hitting shift. I still have another problem, though; I still want health to be separate. I initially had the idea to create a variable, initialize it as equal to the player's current health, give them the powerup, then set their HP back to what it was using said variable. The problem is, in searching
these pages, I couldn't find any constants I could use (or figure out how to use) to get/set the HP. Alternatively I could set a separate counter, and simply have that change when hits or at-will powerups are detected, but then I run into another problem. The hearts at the top of the screen would be meaningless and confusing, and I'd want to get rid of them, but I also need to find a nice-looking way to display the new health counter.
I'm also encountering a bug (I believe it was mentioned in a post I saw, or maybe on the PGE wiki) where, when using onLoop() to set the player's powerup if it's not what it's supposed to be, they phase through the floor if it happens while they're taking damage. If anyone has a tip for that, I could use it. Thanks!