Quantcast
Channel: Active questions tagged game-maker - Stack Overflow
Viewing all articles
Browse latest Browse all 180

Using move_and_collide with multiple objects in GameMaker 2

$
0
0

I have the following object types:

  • oWall
  • oEnemy

And I'm trying to call the new move_and_collide function in such a way that it would collide against both of them. Something along the lines of:

objectsToCollide =  array_push(array_create(0), oWall, oEnemy);move_and_collide(xSpeed, ySpeed, objectsToCollide);

I know that a viable solution is the make a new parent object that oWall and oEnemy could inherit from, but I'm hoping to avoid that since it would add unnecessary entities in my code.


Viewing all articles
Browse latest Browse all 180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>