Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

EspiePrince

2
Posts
5
Following
A member registered Jul 02, 2022

Recent community posts

Yeah, that worked! Thank you for your help!Although for some reason the compass contraption is only updating when I click the direction buttons twice.

Hello! For Decker Fantasy Camp, I've been trying to make an old-school dungeon-crawler game. I don't have much programming experience, so this project is more to teach myself how to use Decker than make a good game. With that said, I think so far I've been learning pretty quickly.

I figured out how to use checkboxes to make a simple "turning and walking" system. You click on the up button, and if you are not already facing north, you turn north. If you are already facing north, you go north one card. I wanted to add a compass to make it easier to tell what direction you are facing, and here's where I'm running into trouble.

I wanted to make the compass a contraption that way I can simply copy and paste the contraption to each of the cards rather than needing to constantly copy and paste the same four compass canvases over and over. I made my little canvases to go in the contraption, copy and pasted them into the contraption, but they don't seem to be showing up the way they should. I was trying to make one of the canvases visible depending on the direction the player is facing and hide all the others, but changing directions doesn't seem to affect what canvases are shown or hidden at all. If I set the canvases to hidden in the contraption they stay hidden no matter what buttons I press and if I set them to visible they stay visible no matter what buttons I press.

Anyway, here is the code for the contraption. 

if deck.cards["f"].widgets.face_north.value=1
 compass_neutral.show:"none"
 compass_n.show:"transparent"
 compass_e.show:"none"
 compass_s.show:"none"
 compass_w.show:"none"
elseif deck.cards["f"].widgets.face_east.value=1
 compass_neutral.show:"none"
 compass_n.show:"none"
 compass_e.show:"transparent"
 compass_s.show:"none"
 compass_w.show:"none"
elseif deck.cards["f"].widgets.face_south.value=1
 compass_neutral.show:"none"
 compass_n.show:"none"
 compass_e.show:"none"
 compass_s.show:"transparent"
 compass_w.show:"none"
elseif deck.cards["f"].widgets.face_west.value=1
 compass_neutral.show:"none"
 compass_n.show:"none"
 compass_e.show:"none"
 compass_s.show:"none"
 compass_w.show:"transparent"
else
 compass_neutral.show:"transparent"
 compass_n.show:"none"
 compass_e.show:"none"
 compass_s.show:"none"
 compass_w.show:"none"
end
Thank you for any help you can give, and I'm sorry if my explanation isn't very clear. I'm still very new to Decker and programming in general.