Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question About Target(I Think)
#1
? 
So. I'm doing basic AI for NTSDII. For now this AI can:

Decide when is better use melee/Long range style of battle
Look for a friend that can cure the char
Look for a friend that need cure and cure this char
Basic things like: recharge in right time, defend, dodge...

what i wanna know is:

Is possible to make a char notice that him is fighting against more than one char?

And/or

Know how much HP the other TEAM(not only one target) have?


Thanks for help :)
Reply
Thanks given by:
#2
yes - create a for loop
cycle through all objects (i = 0 to 399) with loadTarget
and check their state
if an object is a character whos not on your team, add his hp to a variable

once the loop is done you have a variable with the sum of all opponents hp
Reply
Thanks given by: samael
#3
Wow.. Thanks Bro!! REALLY thanks!!!

Btw for who don't understand:

PHP Code:
//get_enemies_data 
    
int TTGT 0;
    
int TTHP 0;      
    
int m 0;    
    for (
int i 0400i++)
    
  {if (
loadTarget(i) == && target.num != self.num && target.team != self.team && target.hp 0){
   
i;TTHP target.hp+TTHP;TTGT = (target.hp/target.hp)+TTGT;
  }} 



Were TTHP will be the sum of all enemies hp and TTGT will be the amount of enemies. Correct if i'm wrong YinYin...
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)