Scripting Individual Fight Timers

Hey there! I’m very new to game dev and with a few udemy tutorials under my belt I wanted to tackle my own project. The idea is that the player has cards for items and characters and places them at locations where that character will battle the enemy at that location. Pokemon meets Cultist Simulator if that helps express the concept.

The thought is that locations deal constant damage to the player unless occupied by a character card, while occupied by a character card the location and character deal damage at set unique rates (so you could have a slow character deal damage less often than a weak fast one). Then there are other locations you could use to get new character cards or upgrade character cards.

I’m planning the cards to be scriptable objects with a prefab for art and then I can serialize their stats. Locations would likely be scriptable objects as well with likely a tag system for whether it’s a fight location or an upgrade one.

With the summary out of the way, my questions are:

  • Do you have any guidance on getting the cards to plug into locations elegantly during gameplay? I’m very new to code and while I can program basic things like movement and stats when it comes to drag and drop card management I’m having trouble starting.

  • What’s a good technique for the timers between locations and characters? Should I create some sort of standard tick rate for them to reference or anything?

Thanks for any help you can give! Happy to be directed to tutorials or documentation you find useful.

I’m assuming you will have an array of different cards and interactions, for the gameplay part you should look into various codding patterns so you can keep everything under control.

for the animation there are various solutions, a free asset you can use is DoTween that will let you animate the position, scale, rotation of the cards to make them “stick” elegantly in their place

1 Like

Thanks for the dotween recommendation! I remember glancing at it but didn’t see the appeal at the time, I’ll check it out!