Hey guys, consider this as my introductory thread or something. So, yay.
I've been creating an AI for my map, all is working, but I cant seem to figure out how to make certain things run on it. So, I would just like you guys to give me a sort of solution on how to accomplish the tasks about to be said. vJass, Jass or even plain GUI is fine. I can work my way on the three.
Ok, so here:
1. How do I create a certain point in a random range from 100 - 1200 and in a random angle/facing and check if that point is pathable or not. If yes, move to it. If no, loop again until a pathable point is made. (I know how to do this but not this) After, if the unit enters or goes to the said point, new one is created. This would be run until a target is acquired.
2. How do I make something like this: Every few seconds (or oven milliseconds) the computer finds the unit with the largest threat and attack the said unit. Every unit gets a threat and is a real. Also, if the unit is a hero, the threat increases by like 2x or 2.5x.
3. How do I do: When the unit's hp drops to say like 25%, they retreat to a point like offset by 1200 points. If the hp is like 10%, the unit flees to the nearest fountain.
4. How do I make the AI buy items? I can make this, but I need more solutions, since mine is terribly long.
5. Last, how do I make unit cast spells/use items depending on their own or enemies stats? Ex. if the AI has 20% hp and has potions, use the potions. If the enemy unit has 200 hp left and the AI has a spell which deals like 250 damage, spell casted.
Thanks a lot,
Verkas
I've been creating an AI for my map, all is working, but I cant seem to figure out how to make certain things run on it. So, I would just like you guys to give me a sort of solution on how to accomplish the tasks about to be said. vJass, Jass or even plain GUI is fine. I can work my way on the three.
Ok, so here:
1. How do I create a certain point in a random range from 100 - 1200 and in a random angle/facing and check if that point is pathable or not. If yes, move to it. If no, loop again until a pathable point is made. (I know how to do this but not this) After, if the unit enters or goes to the said point, new one is created. This would be run until a target is acquired.
2. How do I make something like this: Every few seconds (or oven milliseconds) the computer finds the unit with the largest threat and attack the said unit. Every unit gets a threat and is a real. Also, if the unit is a hero, the threat increases by like 2x or 2.5x.
3. How do I do: When the unit's hp drops to say like 25%, they retreat to a point like offset by 1200 points. If the hp is like 10%, the unit flees to the nearest fountain.
4. How do I make the AI buy items? I can make this, but I need more solutions, since mine is terribly long.
5. Last, how do I make unit cast spells/use items depending on their own or enemies stats? Ex. if the AI has 20% hp and has potions, use the potions. If the enemy unit has 200 hp left and the AI has a spell which deals like 250 damage, spell casted.
Thanks a lot,
Verkas