Hello all,
I'm developing an "achievement" system in my Pulp game, but I've hit a road block: the variables that track each achievement are triggering, but they don't seem to work on my "achievement progress page." Here's how it works:
When the player does something that activates an "achievement," here's how it works:
if achievement==0 then //checks if they've already done the achievement
achievement = 1 //set to "achieved"
store "achievement"
say "Achievement Unlocked"
end
When I do the required action, the game will say "Achievement Unlocked." So I know that part is working.
I have a series of Rooms ("the gallery") that each display a work of pixel art for each achievement unlocked. I use Items to direct the player to either: 1) the next piece of art if they've done the achievement, or 2) an essentially blank room if they have not. The Items look like this:
on collect do
if achievement==1 then
goto 11,14 in "nextArt"
else
goto 11,14 in "blankRoom"
end
end
For some reason, the game is always sending the player to the blankRoom, even if the achievement variable is 1.
I've tried declaring each achievement variable first when the game starts, thinking maybe you can't create a variable in an "if" statement, but that didn't work.
I'm really at a loss here. Any ideas?