iparalyze
Issue with events
Mm the logic inside the TurnsManager method should check for the property hero.IsDead, not if the character is present... Characters are not eliminated from the list when they die, only their property goes from IsDead = false to true
11 replies
❔ Looping problem
The problem was that foreach inside a while loop. If you want to have a look at it it's now working. I found a way to breakaway from both the for and the while loop using a bool variable. Well chatgpt suggested it, and for once I have to admit it's working... You can check out the latest commit on github. Thanks a lot for taking a look at my code
20 replies
❔ Looping problem
Thank you for pointing out the issues, I'll definitely sort them out later. I'm not sure they're impacting the current problem I have. I don't understand why the turn manager doesn't stop when all monsters are dead. this is how far I've gotten but it's still giving me the same issue. I gave up on IsDead and now I'm removing characters from the lists and check if (Party.HeroesParty.Count ==0 || Party.MonstersParty.Count ==0) but still nothing... https://github.com/aleviti2/FInal-Battle
20 replies