|
Post by John on Jan 16, 2023 11:31:16 GMT
Hi all,
The first thing I found when I play around with the code I note that after I finished moving and acting I still could go back to command selection state from facing state which is odd, so I added
if (!turn.hasUnitMoved || !turn.hasUnitActed) to the onfire method.
The second thing I found when the unit turns sometime it still turns 270 degrees when it's trying to turn from north to west or from west to north. The reason this happens is because sometimes the startTweenValue.y is not accurate. It makes the method Approximately return false. To avoid it I added
t.startTweenValue.y = Mathf.RoundToInt(t.startTweenValue.y); above the if statement.
|
|
|
Post by John on Jan 16, 2023 11:48:29 GMT
Third one I found when the computer player will use the spell if the enemy (aka human player) is in range even if the computer player's unit has been slienced or out of mana, and of course the action will fail. So I added
!plan.ability.CanPerform()
to the check list to make the computer player a bit "smarter".
|
|
|
Post by Morro121 on Feb 10, 2023 17:15:30 GMT
Hey, Im trying to figure out where exactly in code did you put this check in? I was trying to solve this problem for some time now.
|
|
|
Post by John on Mar 23, 2023 10:00:07 GMT
Hey, Im trying to figure out where exactly in code did you put this check in? I was trying to solve this problem for some time now. I added the check in fixedabilitypicker class.
|
|