Newgrounds Background Image Theme

Our goal is for Newgrounds to be ad free for everyone! Become a Supporter today and help make this dream a reality!

hitTest multiple platforms

653 Views | 1 Reply
New Topic Respond to this Topic

I cannot seem to get a hitTest with multiple objects to work...

What am I doing wrong?

var platforms: Array = ["platform1", "platform2"];

for (var i: int = 0; i < platforms.length; i++) {

 if (player.hitTestObject(background01.platforms[i])) {

  playergravity = 0;



error is term is undefined and has no properties

Response to hitTest multiple platforms 2020-07-19 00:24:46

Nevermind.. Got it.