Posts: 113
Threads: 15
Joined: Mar 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!
Life is like a bicycle; to keep your balance, you must keep moving.
Thanks given by:
Posts: 2,341
Threads: 79
Joined: Mar 2008
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
Thanks given by:
Posts: 22
Threads: 2
Joined: Aug 2012
Just learn C, AngelScript is VERY similar to it. If you have any programming experience, there should be no problem.
Thanks given by:
Posts: 113
Threads: 15
Joined: Mar 2012
08-15-2012, 09:36 AM
(This post was last modified: 08-15-2012, 09:38 AM by professional DCer.)
(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?
Life is like a bicycle; to keep your balance, you must keep moving.
Thanks given by:
Posts: 2,341
Threads: 79
Joined: Mar 2008
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
Posts: 113
Threads: 15
Joined: Mar 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?
Life is like a bicycle; to keep your balance, you must keep moving.
Thanks given by:
Posts: 2,341
Threads: 79
Joined: Mar 2008
yes - in that case the character will only do what you have scripted
Posts: 113
Threads: 15
Joined: Mar 2012
08-15-2012, 10:56 AM
(This post was last modified: 08-15-2012, 10:58 AM by professional DCer.)
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?
Life is like a bicycle; to keep your balance, you must keep moving.
Thanks given by:
Posts: 2,341
Threads: 79
Joined: Mar 2008
08-15-2012, 11:25 AM
(This post was last modified: 08-15-2012, 04:21 PM by YinYin.)
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);
Posts: 113
Threads: 15
Joined: Mar 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?
Life is like a bicycle; to keep your balance, you must keep moving.
Thanks given by: