When 2 objects occupy the same cords , one kills the other , need help.

I have tried some things but they dont work i need some ideas to make this work.
4 Replies
Thanos_Tham
Thanos_ThamOP5w ago
this is my code I have made Warrior , Rogue , Sage they each get random power and random potition in a chess board i have made a movement option but i still need to make it so that it happens each time user presses a button ( i will do that later ) BUT the main issue is i dont know how to make them so that if they are on the same potition the one that has less power dies i have a die function , i have the random power ( and abilities that give +1 power under some condition ) if anyone got time to offer an idea i would love to hear it
HtmlCompiler
HtmlCompiler5w ago
(it's position, not potition) what's exactly the difficulty? imagine you have the code to ask the user to move the character if on the target coordinates are occupied by another character then the "fight" starts so you have to search between them who is there
Thanos_Tham
Thanos_ThamOP4w ago
i know , that makes a lot of sense , but i am only 2 months into coding and i dont know the way to do it i also mentioned i want the user to "roll" the position each time, dont know how to do that either i somehow kinda managed to do the die(); thing
Want results from more Discord servers?
Add your server