Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Enemy AI

Author
Message
robster
15
Years of Service
User Offline
Joined: 15th Dec 2008
Location:
Posted: 22nd Jun 2009 15:03
Hi I need help with getting my enemy to have AI.

I need help with things likle shooting, moving and following ect.
I have looked at the dark dungeon demo in the game creators folder but I can't get it to work. Any help would be greatly appreciated thx.

code would be great!

http://www.prizerebel.com/index.php?r=1083856

free stuff!!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 22nd Jun 2009 23:52 Edited at: 22nd Jun 2009 23:54
Well a very good outline for doing enemy AI to avoid bugs is doing a switch statement. So you would have something like:


Then lets say you want the enemy to move to the player after falling off a building or something. All you have to do is this:

You will obviously have to fill in the comments but that gives you a good outline on how all AI should look like. There is of course other alternatives but doing this method avoids a lot of bugs because the object (enemy) can only do one of those case statements at once no matter what.

robster
15
Years of Service
User Offline
Joined: 15th Dec 2008
Location:
Posted: 23rd Jun 2009 15:00
Thanks I will give that a go but could I also have an example of some code for the enemy shooting you please.

http://www.prizerebel.com/index.php?r=1083856

free stuff!!!

Login to post a reply

Server time is: 2024-10-01 05:44:50
Your offset time is: 2024-10-01 05:44:50