Hey all. This seems simple but I can't get it to work. How do I give the player access to a ability when they collide with a specific item. So I created a simple pause and inventory. You pause, black overlay comes up and it shows you the items/abilities collected, if any. I'm using a single sprite object with multiple animations as the ability sprites I place on the layouts. The sprite has an instance variable called itemName. Each animation is a single frame with art of individual items and item names (power gloves for example).
I can't seem to "link" the player obtaining a specific item and then "giving" player the access and the ability to perform the specific new ability. In this case, the ability is a passive power glove upgrade. The player can move heavy objects once the player "obtains" the power glove item. Once you collide with an important item, shows up in your inventory. Seems straightforward enough to me. I'm not linking the inventory/pause menu with the abilites in any way really. Once the player collides with an item, the instance variable that says whether a ability is on or off switches to 1, turning the ability on. So in this case, the powerGloves instance variable on the player sets to 1 activating the "Power Glove Push System" group. The pushable box has platform and solid behaviors. For some reason, when I collect the power gloves item, the powerGlove instance variable doesn't switch to 1.
I'm looking at previous my events and the "syntax" for this stuff looks correct. Here's the code. If I disable the 4 lines above the "power glove push system", the push ability works. Since all the game upgrades/items are animations on a single sprite, I used "pick Unique ID" so the game knows what specific object sprite is the power glove animation sprite. I couldn't figure out any other way to do it. I hope I've given enough context and information about my problem. Let know know if you want to look at a capx. Thanks! Second pic is inventory events just in case.
Inventory/Pause events just in case.