Jump to content
Message added by TopicLocker3000

This topic was automatically locked after 6 months of inactivity. If you are the topic owner, please contact a moderator to have it unlocked.

Recommended Posts

Hey The Glorious David, my name is also The Glorious David I have been using Gamemaker for about 4 years and awhile ago I made this script take a look.

if object1.x>=object2.x && object1.x <= object2.x+object2.sprite_width && object1.y = object2.y {
return true
}else if object1.x<=object2.x && object1.x >= object2.x-object2.sprite_width && object1.y = object2.y {
return true
}else if object1.y>=object2.y && object1.y <= object2.y+object2.sprite_height && object1.x >= object2.x && object1.x<=object2.x+object2.sprite_width {
return true
}else if object1.y<=object2.y && object1.y >= object2.y-object2.sprite_height && object1.x >= object2.x && object1.x<=object2.x+object2.sprite_width {
return true
}else if object1.y>=object2.y && object1.y <= object2.y+object2.sprite_height && object1.x <= object2.x && object1.x>=object2.x-object2.sprite_width {
return true
}else if object1.y<=object2.y && object1.y >= object2.y-object2.sprite_height && object1.x <= object2.x && object1.x>=object2.x-object2.sprite_width {
return true
}else{
return false
}

3D sorry I make a 3DD codeI 

I USED SPRITES FOR A 3D GAME WOW LOL.

Edited by x33perking
Link to post
Share on other sites

wat. That code does nothing... only returns true/false... I guess from the title that it's suppose to emulate physics, but keep in mind that Mine-imator is in 3D, and it greatly complicates matters, you can't just compare collision boxes/masks, objects in Mine-imator (especially schematics) have irregular shapes.

Link to post
Share on other sites

Sorry The Glorious David, I might use a different version of gm.

This worked for my game, and it was 3d in most senses.

I'll try better master.

From what I can see from the code snippet, you're only checking collisions along the x/y axis, there's no .z in there. This shouldn't work very well in 3D. :|
Link to post
Share on other sites

I know It could be a little less sloppy.

P.S I forgot to put in the z coordinate for 3 dimensions.

MES A NOOB AT CODING LOL.

P.S I made this for my first 3d platformer where the other stuff was 3d, but the character  wasn't so yah. It's kind of like fez.

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...