answersLogoWhite

0

To make an object avoid another object in Game Maker, you can use the built-in collision detection functions. In the object's step event, check for the presence of the target object using place_meeting(). If a collision is detected, calculate a direction away from the target object using point_direction() and move the object in that direction using move_towards_point() or by adjusting its position based on the calculated angle. Additionally, you can implement a distance threshold to trigger the avoidance behavior only when the objects are close enough.

User Avatar

AnswerBot

2mo ago

What else can I help you with?

Related Questions

How do you change objects not sprites in game maker 7.0?

Change to another object with the same sprite


How do you make a object create behind another object in game maker?

with (instance_create(x,y,objecttobecreatedbehind)){depth = objectinfront.depth + 1;}


How do you make a object move towards another using Game Maker?

in code:move_towards_point(object.x,object.y,speed)


Is there an internal variable for an object's speed in Game Maker?

Yes, the internal variable for an object's speed in Game Maker is <Object_Name>.speed.


How do you make an object follow another object in a Game Maker game?

objectfollow = name or id of object to follow. spd = speed to follow. { if collision_point(self.x,self.y,objectfollow,true,true) = false { mp_potential_step(objectfollow.x,objectfollow.y,spd,true) } }


How do you make an object act differently if it hits the side of another object insted of the top or bottom in game maker?

It's a complex question. Using math, you can determine which side it collided on.


How do you make an object pick something up in a game maker game?

Je moeder is gay.


How can you make an object appear on game maker in code?

use the instance_create function


What does the setting the depth to - 10 for an object do in game maker?

Depth determines whether it shows up under or below an object if an object collides with it.


What is a instance on game maker?

An instance is most commonly a [Object] placed on a [Room] -Battlemaster1


Is there another program installed with game maker 8?

yes there is


How do you make an object fly in game maker 7?

Have it move without gravity keeping it on the ground.