#How to make an enemy NPC prioritize player with lowest health

1 messages · Page 1 of 1 (latest)

analog nacelle
#

I can add them to a table, but I don't know how to sort it in the way I'm trying to do. Any help?
I'm using an extremely basic Pathfinding model for now

neat sand
#

In your loop keep track of the player with lowest health and their actual health

every time you loop through a player check if their health is lower than the current lowest players health and if it is, replace the variable

Hope that makes sense

analog nacelle
#

im really new with tables so I don't know how to find specific things like that

slate apex
#

it's that easy fingerguns

#

or maybe you didn't write that code and it's going to be very hard for you since you didn't write the code fingerguns

analog nacelle
slate apex
analog nacelle
#

i know the arguments to add/remove things