# Artificial Inteligence - Macromedia Director 3D

Hi I've been working on a 3D shockwave game recently and I've got to the point where I can explore a 3d environment relatively well, it?s just a case of giving players something to do. I was wondering if anybody can help me out, or give me a link to a tutorial of how to get ?basic? artificial intelligence? When I say basic I do realize I may be greatly contradicting myself, but what I mean is to get an enemy that fires its gun at you within a certain range. At the moment I could just place different enemies ...

1. ## Artificial Inteligence

Hi
I've been working on a 3D shockwave game recently and I've got to the point
where I can explore a 3d environment relatively well, it?s just a case of
giving players something to do. I was wondering if anybody can help me out, or
give me a link to a tutorial of how to get ?basic? artificial intelligence?
When I say basic I do realize I may be greatly contradicting myself, but what I
mean is to get an enemy that fires its gun at you within a certain range. At
the moment I could just place different enemies at different points in the game
like around the corner, so there is no complicated moving involved. It would be
a case of the player seeing an enemy by surprise and having to act immediately?

r1chard..w3lch Guest

2. ## Re: Artificial Inteligence

You could occasionally cast a ray from the enemy's position, along the vector
from the enemy to the player (you'll want to only include your basic scenery in
this test, not player or enemy models). If the first object intersected is
further away than the distance between the enemy and the player, then the enemy
can see the player. and should take action.

You can also easily check the distance between the enemy and the player like
so:

dist = (player.transform.position - enemy.transform.position).length

Of course none of this touches on getting enemies to move intelligently around
your scene, which is a whole other kettle of fish!

hope this helps!

- Ben

duckets Guest

3. ## Re: Artificial Inteligence

Thanks i will look into that ben
r1chard..w3lch Guest

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•