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.

Newcomers DBPro Corner / A.I.!!! My First Game

Author
Message
Jozers
20
Years of Service
User Offline
Joined: 19th Nov 2004
Location: If I knew I would tell you!!
Posted: 26th Feb 2005 21:02 Edited at: 26th Feb 2005 21:51
Hi, I am have trouble with A.I. in my (first)game I have got it to sort of work but it is very buggy. The ideas is that the goblin is meant to come after the knight, this does kind of happen but like i said its very buggy. I also want the goblin to attack the knight when it is close. How do i do this?

Could someone please just check my A.I. code and help me were i have gone wrong And if someone could help with the attacking problem i would be grateful.

Here is my code


Thanks
Jozers

EDIT
All media is on either DarkMATTER or DarkBASIC CD's
BTW I'm using DBC

EDIT
It might be better if the goblin just walks around Randomly and when its attacked it fights back. Is there anyway i can make the goblin walk around randomly?

Sorry for the change of idea
Jozers
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 27th Feb 2005 05:29 Edited at: 27th Feb 2005 05:31
Jozers, what's "buggy" about the movement? Does it suddenly 'jump' or what? Also, I looked for the media in all my folders and can't find it all (I think there were several releases based on when you bought), so please post a media zip file.

Looking at your code and don't see anything wrong.

Quote: "It might be better if the goblin just walks around Randomly and when its attacked it fights back. Is there anyway i can make the goblin walk around randomly?"


Probably not "better" (kinda boring), but it depends on what you want to accomplish.

Quote: "I also want the goblin to attack the knight when it is close. How do i do this?"


Get some of the basics down and finished first. Then move on to an attack.

"Droids don't rip your arms off when they lose." -H. Solo

REALITY II

Login to post a reply

Server time is: 2024-11-27 23:37:39
Your offset time is: 2024-11-27 23:37:39