The Daily Click ::. Forums ::. Klik Coding Help ::. Two movementproblems
 

Post Reply  Post Oekaki 
 

Posted By Message

Jakob37



Registered
  07/08/2005
Points
  541
11th October, 2006 at 03:59:13 -

I am making a game with enermies who when they are closer than a certain dinstance walks agains you.

The first problem is that when your character is outside their range they just stand still. I want them to walk around aimlessly instead of just, yes, standing still.

The other problem is that when they moves towards you they either walks on each other so they in the end just are a big pile of enermies which dies at the same time or if I use "movement stop" they locks each other in a big unmoving clod.

If you understands my confunsing explanation and have the knowledge to solve my problems, it would be very appreciated if you can help me

 
n/a

Kalle T



Registered
  18/09/2004
Points
  362
11th October, 2006 at 07:46:16 -

Try with these...
set enemies value A to a random number like 0-5 every 1 sec, and add a condition to every value.
value A = 1 = stop
value A = 2 = look in random direction + start +speed
and so on....

U can also use a counter object, but then it will affect every enemy at once..

I use bouncing ball movment for enemies, works best for me. Enemies will behave more realistic when they randomly move and stop and looking around.

For the "big pile" problem I use a invisble circle attached to the enemy that is slight bigger then the character, and make it bounce with eachouther and the background instead of the character bouncing around.

If these sounds to hard I can give u a more detailed description.

 
Image
Image
Image

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
11th October, 2006 at 08:03:17 -

Problem 2:
-- Try 'Movement -> Bounce'

Problem 1:

For each enemy, create a 'TARGET' object. Every 3 seconds (or more), set the position of every TARGET to a random spot on the level. All enemies who are not in range of the player will look at the target objects and walk towards them. If they touch the target before it's moved away, they stop and wait.

 
191 / 9999 * 7 + 191 * 7

Jakob37



Registered
  07/08/2005
Points
  541
11th October, 2006 at 14:41:26 -

I will experiment a bit with the tipses to see which works best of them but they all seemes to be pretty good.

Thanks for the help both of you

 
n/a
   

Post Reply



 



Advertisement

Worth A Click