Posted By
|
Message
|
Paul_James
Registered 02/07/2002
Points 1320
|
12th September, 2004 at 19:09:10 -
Okay, Im just lost. Ive tried everything i can think of for AI, but it just doesnt seem to work. I dunno what Im missing. If anyone has good AI or can explain to me a decent AI engine, Id be forever grateful.
thanx
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.
Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...
|
Radix hot for teacher
Registered 01/10/2003
Points 3139
|
12th September, 2004 at 19:38:04 -
One of the simplest ways to do AI is to copy the events that run your main character, that is walking, up, down, left, right, and applying them to an enemy object, then replacing the keypresses with conditions.
For example, rather than moving left when the left key is pressed, it might move left whenever the player's X position is less than its own.
If you can give me a specific example of which zelda enemy's AI you'd like to emulate I can probably explain it specifically to you.
n/a
|
Paul_James
Registered 02/07/2002
Points 1320
|
12th September, 2004 at 19:51:32 -
well specifically this is what im trying to emulate, is a theif that walks or stands, depending on what he feels like at the time, and when he comes into seeing distance either chases after you - when he has full health, or runs away when he has no health. i have those events basically done by Alterate Values, but its the actual testing on when the AI sees you is whats hurting me.
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.
Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...
|
Radix hot for teacher
Registered 01/10/2003
Points 3139
|
12th September, 2004 at 20:03:42 -
Methods:
- Have an invisible circular active object layered over the enemy that detects when it's being overleapped.
- Shoot invisible line-of-sight detectors
- Use the positioning in the code, like so:
X(Player ) < X (theif) - 16
+ X(Player ) > X (theif) - 256
Theif value A > 1
- (MOVE LEFT TRIGGER)
X(Player ) < X (theif) - 16
+ X(Player ) > X (theif) - 256
Theif value A <= 1
- (MOVE RIGHT TRIGGER)
Etcetera. That's what I'd do.
n/a
|
Paul_James
Registered 02/07/2002
Points 1320
|
12th September, 2004 at 21:30:42 -
yea but i dunno i tried alot of that and plus i have more than one of the objects you know. im like ripping my hair out cauze ive been working on this for the past like 3hours
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.
Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...
|
Radix hot for teacher
Registered 01/10/2003
Points 3139
|
12th September, 2004 at 23:06:03 -
Then use value spreading or something to set the object focus. You should have said that in the first place, it's entirely peripheral to the problem. There's articles on it. http://create-games.com/cs_search.asp
n/a
|
|
|