Jump to content


Photo

As soon as object1 stops touching the block


  • Please log in to reply
1 reply to this topic

#1 8feet

8feet

    GMC Member

  • GMC Member
  • 104 posts

Posted 29 July 2012 - 04:27 AM

I'm been having a struggle over here, and I don't get it.

What I want... there are 5 objects: Player01, entrance01, exit01, block, and exit_parent.

exit01 has a parent known as exit_parent
exit01 follows player01's y coordinates.

if player01 touches entrance01 then player01 transports to exit01 ONLY if exit_parent .power == 1

if exit01 touches block then exit_parent .power = 0
but if exit01 no longer touches block then exit_parent .power = 1'

I've used this code in the step event in exit_parent...
if (!place_meeting(x,y,block))
{power = 1}
else
{power = 0}

I've been using everything I've known and it just won't click.

I'm using Game Maker Studio... Tell me if there are some bug that is preventing me from getting what I want D:
Thanks in advance and God Bless!!!

Edited by 8feet, 29 July 2012 - 04:32 AM.

  • 0

#2 Wraithcutter

Wraithcutter

    GMC Member

  • New Member
  • 286 posts
  • Version:GM8

Posted 29 July 2012 - 06:43 AM

Let's rule out the simplest solution first.

By any chance, does your exit01 object have it's own step event code?

If so, it won't fire off it's parent's.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users