Enemy AI help PLEASE HELP ME!

I was makin an enemy ai to attack at random heath points and Used psuedocode to write the coe but it didnt work the game just lagged like heck
please help me
Heres the code

Code

1 Like

Ok,
I think there are 2 reasons:

  1. You put the variables in the wrong order.
  2. This, I don’t know how to describe it:

Here’s the code with the correctly ordered variables:

5 Likes

Thank you so much !

1 Like