I am not a professional but coding is more holding logic paths in your mind and translating large concepts into bite-sized steps.
In my (extremely amateur) solo dev project this weekend - a card game, I needed a trap that’s invisible to opponents but visible to the player.
So we create an (invisible) control node with an (optionally visible) animated node with a text label that inherits the visibility of the immediately parent.
Then the top level node needs a “when I give you a place to be, animate appearing then animate moving to that place function” and it needs to respond to the card_played signal, and it needs to check the logic to see if that’s the time to trigger, and if so which functions it needs to activate (the board, the “umpire” node, the opponent hand) in which order, then call the dialogue system to display dialogue, then query the dialogue database for which message to show, in which language (currently only English) which in itself has a controller that forces the order of animations and turns on/off clicks to various functions while this function resolves…
The only math involved is “how fast should the node move” and “if this trap blocks face cards, then block anything with a card value over 10” (jack queen king)
I am not a professional but coding is more holding logic paths in your mind and translating large concepts into bite-sized steps.
In my (extremely amateur) solo dev project this weekend - a card game, I needed a trap that’s invisible to opponents but visible to the player.
So we create an (invisible) control node with an (optionally visible) animated node with a text label that inherits the visibility of the immediately parent.
Then the top level node needs a “when I give you a place to be, animate appearing then animate moving to that place function” and it needs to respond to the card_played signal, and it needs to check the logic to see if that’s the time to trigger, and if so which functions it needs to activate (the board, the “umpire” node, the opponent hand) in which order, then call the dialogue system to display dialogue, then query the dialogue database for which message to show, in which language (currently only English) which in itself has a controller that forces the order of animations and turns on/off clicks to various functions while this function resolves…
The only math involved is “how fast should the node move” and “if this trap blocks face cards, then block anything with a card value over 10” (jack queen king)