So, I'm trying to implement a save/load system based off of this example: Simple Save Point Example
I can get my game to properly save/load the player's location after interacting the "save_kiosk" sprites located in each room:
on interact do
menu at 9,11,4,2 then
option "Save" then
continue_room = event.room
continue_x = event.px
continue_y = event.py
store "continue_room"
store "continue_x"
store "continue_y"
store
say "Game saved!" at 6,12,11,1
end
option "Quit" then
tell event.player to
call "cancel"
end
end
end
end
I'm trying to keep track of "playdate" items that have been collected/interacted with. As an example, I have the user interact with a sprite called "playdatePresent":
on interact do
sound 27
play "playdatePresentOpen" then
gameMode = "paused"
say "You unwrapped a present and found something."
play "playdate_appear" then
swap "playdate_disabled"
wait 0.001 then
gameMode = "playing"
swap "playdate"
end
end
end
end
The item "playdate" appears and then here's what I have so far with that:
on collect do
say "You found a Playdate!"
continue_room = event.room
continue_x = event.x
continue_y = event.y
store "continue_room"
store "continue_x"
store "continue_y"
store
say "Game saved!" at 6,12,11,1
end
I'd also like to keep track of the sprite "playdatePresent_dud too":
on interact do
sound 27
play "playdatePresentOpen" then
gameMode = "paused"
say "You unwrapped a present. Turns out nothing was inside."
swap "white"
wait 0.001 then
gameMode = "playing"
end
end
end
I'm assuming I would need something like this, right?:
continue_playdates = event.playdates
store continue_playdates
"playdates" are how the sprite "computer_terminal" keeps track of playdates found/interacted with:
on interact do
if playdates==0 then
say "You really should get started on finding those missing Playdates"
elseif playdates==1 then
say "You've found 1 Playdate.\n\nThere are still plenty more to find.\n\nWhy don't you go take a look?"
elseif playdates==8 then
say "You've found all the Playdates!" then
fin "Panic was relieved to have all of the missing Playdates returned to them.\n\nThanks for playing my {event.game}!\n\nThe End"
end
else
say "You've found {playdates} Playdates.\n\nThere are still plenty more to find.\n\nWhy don't you go take a look?"
end
end
My game is still very early and just some ideas as of now. If someone could look at my pulp json file and offer some guidance on how to keep track of items interacted with, that would be incredibly appreciated.
The Case of The Missing Playdates.json.zip (25.9 KB)
Thanks so much!