Off Topic > Games

Game maker-How to make enemy walls?

Pages: << < (2/3) > >>

AvailsMew:

The way to go about this should not be invisible walls. You are probably making it so they have no AI whatsoever. Make them stop before they fall or actually define the edge as an object, and make them stop as soon as they hit it with no actual collison but a collision box.

ResonKinetic:

I'm relatively experienced with gamemaker.

All you have to do is create an invisible-to-the-player small cube and place it at the edge of the platform.

Then, in the events of the enemy, do something along the lines of

On enemy collide with (whateveryounameit) make enemy... well...

stuff, I can't explain it.

Here's a bit of code from a game I was working on a while ago.


--- Code: ---Collision Event with object enemy_marker:

reverse horizontal direction

--- End code ---

And to give you a better view,



Make sure collision is unchecked on that enemy marker so the player doesn't collide with it.

EDIT2: Oh yeah, and make sure "visible" is unchecked on the enemy marker.

SpreadsPlague:


--- Quote from: AvailsMew on March 06, 2013, 12:05:19 AM ---The way to go about this should not be invisible walls. You are probably making it so they have no AI whatsoever. Make them stop before they fall or actually define the edge as an object, and make them stop as soon as they hit it with no actual collison but a collision box.

--- End quote ---

if he can't add invisible walls do you really think he knows how to do that

Muzzles56:


--- Quote from: SpreadsPlague on March 06, 2013, 01:25:45 AM ---if he can't add invisible walls do you really think he knows how to do that

--- End quote ---
I think I know how. In theory, anyways.

Thanks, ResonKinetic, I will try that today. If it doesnt work, ill post an update

Isaac Fox:

I can't tell is GameMaker is loving buggy as forget or I'm just doing things wrong, so I gave up on it.

Pages: << < (2/3) > >>

Go to full version