Little Fighter Empire - Forums
Is there any easy ddraw tutorial to script AI? - Printable Version

+- Little Fighter Empire - Forums (https://lf-empire.de/forum)
+-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7)
+--- Forum: AI Scripting (https://lf-empire.de/forum/forumdisplay.php?fid=56)
+--- Thread: Is there any easy ddraw tutorial to script AI? (/showthread.php?tid=8171)

Pages: 1 2 3 4


Is there any easy ddraw tutorial to script AI? - professional DCer - 08-15-2012

Hello friends,
I find it very difficult to script AI by using ddraw. I have read YinYin's AI scripting tutorial but I could not understand it. I was wondering if there is any other tutorial to script AI by using ddraw. If anyone knows any other tutorial so please give the link for it.
Thanks!


RE: Is there any easy ddraw tutorial to script AI? - YinYin - 08-15-2012

just copy the first sample that makes john heal himself if he has lost some hp and then start editing that as you read the tutorial sections to see your edits making the AI behave differently

also post with what exactly you are having difficulties

does anyone actually want to write a second tutorial? i wouldn't mind if it was easier to understand than mine


RE: Is there any easy ddraw tutorial to script AI? - Shymeck - 08-15-2012

Just learn C, AngelScript is VERY similar to it. If you have any programming experience, there should be no problem.


RE: Is there any easy ddraw tutorial to script AI? - professional DCer - 08-15-2012

(08-15-2012, 09:04 AM)YinYin Wrote:  just copy the first sample that makes john heal himself if he has lost some hp and then start editing that as you read the tutorial sections to see your edits making the AI behave differently

also post with what exactly you are having difficulties

does anyone actually want to write a second tutorial? i wouldn't mind if it was easier to understand than mine

Is this enough? I meant only copying john's heal sample will work, what about the basics?


RE: Is there any easy ddraw tutorial to script AI? - YinYin - 08-15-2012

yes
if you only use an ego function the basic AI will remain and use it to determine when to do special moves

look at my clide/maveric ai or others - they all only use the ego function and leave the basic movement to the game


RE: Is there any easy ddraw tutorial to script AI? - professional DCer - 08-15-2012

(08-15-2012, 09:55 AM)YinYin Wrote:  yes
if you only use an ego function the basic AI will remain and use it to determine when to do special moves

look at my clide/maveric ai or others - they all only use the ego function and leave the basic movement to the game

Thanks!, but if i will use the id function then what will happen? Will I have to script the whole AI?


RE: Is there any easy ddraw tutorial to script AI? - YinYin - 08-15-2012

yes - in that case the character will only do what you have scripted


RE: Is there any easy ddraw tutorial to script AI? - professional DCer - 08-15-2012

I have seen many times the cpu tries to jumps when he is going to hit by a range attack like a energy ball or a ice ball similar to it I just want to give my char the ability to run to the opposite direction when a enemy is going to attack him. Is it possible?


RE: Is there any easy ddraw tutorial to script AI? - YinYin - 08-15-2012

of course
your conditions could be

target.state==3 //target is attacking
(target.x-self.x)>0 //target is to your right

and then you can perform
left(1,0);


RE: Is there any easy ddraw tutorial to script AI? - professional DCer - 08-15-2012

(08-15-2012, 11:25 AM)YinYin Wrote:  of course
your conditions could be

target.state==3 //target is attacking
(target.x-self.x)>0 //target is to your right

and then you can perform
left(1,0);

edit: someone please move this to the ai forum

Can I use ego function for it?