Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to: script Artificial Intelligence
#49
YinYin, I tried to make a small Davis AI, to shoot energy balls when he is under 250 HP(Newbie AI I know), but, If I use DlA he randomly shoots left and gets himself kicked in the back, but if I try to make another one with DrA it worked the first I tested it, it is not working right now, here's what I coded.

Code:
int ego(){
if (self.hp < 250){
  DrA();
}
return 0;
}

int ego(){
if (self.hp < 250){
  DlA();
}
return 0;
}

Is something actually wrong with the AI, or did I do something wrong in it?
Oh Also, if I delete one of the code lines, It works again, but after I redo it, it again sends the same error, that 2 functions have the same name
I think I kinda figured it out, so, I will test if that works.
Nope, didn't work.
Spoilered Spoilers (Click to View)

You're just dying if you're living and thinking about a betrayal, revive yourself.
Think about that one person that has trusted you forever, not the thousand people that have betrayed you.
Reply
Thanks given by:


Messages In This Thread
RE: How to: script Artificial Intelligence - by AmadisLFE - 05-18-2014, 06:43 AM



Users browsing this thread: 3 Guest(s)