Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Returning objects, solids, and Game Maker.  (Read 3692 times)

0 Members and 1 Guest are viewing this topic.
Returning objects, solids, and Game Maker.
« on: July 20, 2014, 10:53:28 pm »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
I was adding a boomerang to LTTP Gameboy in Game Maker Studio when I hit a wall. The movement engine is a heavily modified versionof Goodnight's engine.  It makes use of solid objects.

Now, when you use the boomerange or have Zelda following you, the get stuck on any wall object.  I tried several ways to return the boomerang from move_toward to directly changing x and y values.  Either way I try, the boomerang  still gets stuck on any solid object between it and Link.

Just wondering what I can do.  I also tired setting the boomerang's collision mask to nothing which did not work either.
Logged
  • Super Fan Gamers!

Koh

Re: Returning objects, solids, and Game Maker.
« Reply #1 on: July 20, 2014, 11:37:55 pm »
  • Tamer Koh
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Male
  • Posts: 980
Are you using a collision event?  If so, that is the problem itself.  When a collision event is called, the object is placed at the position it was at just before the collision.

Instead, to check for collision, you'd want to do a conditional check within the step event like
Code: [Select]
if !place_free(x + hspeed, y + vspeed)
{
  //Collision code here.
}
Logged
  • Megaclipse Games
Re: Returning objects, solids, and Game Maker.
« Reply #2 on: July 21, 2014, 12:29:11 am »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
Ah.  Thank you.  I was reading the manual about solids and collisions the opposite way that a collision event overrides a solid. 
Logged
  • Super Fan Gamers!
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.138 seconds with 43 queries.