Little Fighter Empire - Forums

Full Version: How to: script Artificial Intelligence
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Idk, when I tried it the first time it actually worked without problems, afterwards it didn't.
Is there some variable to find out if the character is visible? I meat something like Rudolph's invisible move?
.blink

both blinking after getting up (leaving state 14) and Rudolfs invisibility use that same value.
how to know what is the char id?
If you want to check for target id, just do :

If (target.id == 0) print('template');
Hi,

is here some way how to add new move to existing original character without delete original AI? When I use ego() function, it deleted all moves except D>A (Firen's fireball).
I read somewhere it's not possible. How is it now in 2017?

Thanks.
Not really an option. You can either rewrite whole ai or add a part before original script. For now you could optionally use other id that's simply doing all basic moves but no special attacks and add new ai for these.
Add a part before original script? That's what I need. Where can I find original script? (I mean original scripts for Firen, John etc., not mean scripts of custom characters)
(06-11-2012, 01:42 PM)YinYin Wrote: [ -> ]Note that the ego() function is not the main AI function of your character and thus needs to 'report back' to the function it has been called from. This is done with return 0;. The 0 will give the control back to the basic AI (the id() function). If you write return 1; you can retain control in the ego() function.


Simply run the script and at the end return 1. As program ends interpreting your script, it will give control back to the original ai till the end of frame.
You mean like this(?):
Code:
int ego(){
if (self.hp < 400){
DdA();
}
return 1;
}
It's just stand and use it when <400.


When I use this:
Code:
int ego(){
if (self.hp < 400){
  DdJ();
}
return 0;
}
It's working and without original special moves (except D>A).

Can you code it please how do you mean it?
Pages: 1 2 3 4 5 6 7