Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need help with my first AI #417218
02/10/13 12:03
02/10/13 12:03
Joined: Jan 2013
Posts: 106
Only in your imagination!
The_KING Offline OP
Member
The_KING  Offline OP
Member

Joined: Jan 2013
Posts: 106
Only in your imagination!
Hello, everyone

I know that AI is one of the bases of any acceptable game, and because I am just a beginner, I want to know a simple, basic way to make AI as the following:

When the player entity becomes at a certain distance from the enemy entity, the enemy moves towards the player entity and faces him playing a certain animation scene, then when he becomes so close, a punching animation scene is played

Thanks for reading

Re: Need help with my first AI [Re: The_KING] #417222
02/10/13 12:33
02/10/13 12:33
Joined: Mar 2012
Posts: 44
A
Abarudra Offline
Newbie
Abarudra  Offline
Newbie
A

Joined: Mar 2012
Posts: 44
Hello,

you can use "vec_dist" and "vec_to_angle" for the player-enemy distance and facing. There are good examples in the manual for that.
And you should check the latest AUMs. They contain realy good "Basic AI" Tutorials.

regards

Re: Need help with my first AI [Re: Abarudra] #417226
02/10/13 13:23
02/10/13 13:23
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
You can find a very simple AI example I've made long time ago, on my website here:
Zombie [LITE-C]
I guess you'll be able to learn some stuff from it, as it's very basic.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Need help with my first AI [Re: The_KING] #417293
02/11/13 12:10
02/11/13 12:10
Joined: Jan 2013
Posts: 106
Only in your imagination!
The_KING Offline OP
Member
The_KING  Offline OP
Member

Joined: Jan 2013
Posts: 106
Only in your imagination!
I am sorry if I was annoying you by my very simple questions ,3run but I am a very beginner ,so I couldn't understand most of your Lite-C AI zombie example (I liked it very much, but there are some things that I couldn't understand even after reading about them in the manual)

Now, I only need a Lite-C script for "shooting" the enemy (how to make its health decrease only when the cursor is over it,..etc.)

Thank you guys for helping

Last edited by The_KING; 02/11/13 12:11.
Re: Need help with my first AI [Re: The_KING] #417307
02/11/13 14:05
02/11/13 14:05
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
Quote:
When the player entity becomes at a certain distance from the enemy entity, the enemy moves towards the player entity and faces him playing a certain animation scene, then when he becomes so close, a punching animation scene is played

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=414603#Post414603

Seen this one ? AI does exactly that what ure asking for.
Edit: Except of punching, but would be easy to implement.

Last edited by rayp; 02/11/13 15:12.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Need help with my first AI [Re: rayp] #417317
02/11/13 15:18
02/11/13 15:18
Joined: Apr 2008
Posts: 2,488
ratchet Offline
Expert
ratchet  Offline
Expert

Joined: Apr 2008
Posts: 2,488
Read AUM 106, it contains almost all you ask laugh

Re: Need help with my first AI [Re: The_KING] #417634
02/14/13 20:09
02/14/13 20:09
Joined: Jan 2013
Posts: 106
Only in your imagination!
The_KING Offline OP
Member
The_KING  Offline OP
Member

Joined: Jan 2013
Posts: 106
Only in your imagination!
Here is my piece of code + a simple game resources used by it (I used some models from 3D Game Studio templates (one of them, the alien model, for it, I removed the weapon). Also, I used a level template from lite-C workshops "lite-c samples" file)

Note: after downloading, open the script file named "har" not "tr"

Download link: http://www.filehosting.org/file/details/420168/For_help.rar

Thank you very much for helping

Last edited by The_KING; 02/14/13 20:57.
Re: Need help with my first AI [Re: The_KING] #417640
02/14/13 21:11
02/14/13 21:11
Joined: Jan 2013
Posts: 106
Only in your imagination!
The_KING Offline OP
Member
The_KING  Offline OP
Member

Joined: Jan 2013
Posts: 106
Only in your imagination!
I knew the "chasing" method ,but I want a method to make the player able to shoot the enemy using a cursor

Last edited by The_KING; 02/14/13 21:20.

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1