Help Please collision problem

OK, I am making a game that requires you to drag a square through a maze but the square is growing i want the square to be destroyed when it touches the walls but it just grows past that point i don't know what is going on if anyone would help i would be very thankful!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    When you have a problem with the way your game is coded, you need to provide your rules. You can type them out or post a screenshot (see the instructions in my signature).

    The basic idea is a rule that says When actor collides with actor [wall] --> Destroy actor but without seeing your rules I'm not sure why it's not working for you.

    Also, how are you making the square grow? Which behavior are you using?
  • VW_GamesVW_Games Member Posts: 31
    I have it coded like this on the player actor it says
    When actor receives event -> collide/overlap with actor-> actor type-> walls then destroy this actor

    I am using the basic change size with a .01 growth rate
  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2014
    @Gamers_Inc.
    I am using the basic change size with a .01 growth rate
    That's causing the problem, the change size attribute seems to stop collisions being detected.

    Try using a timer instead.

    Every 0.1 seconds:
    Change Attribute > self.size.Width to self.size.Width+1
    Change Attribute > self.size.Height to self.size.Height+1
  • VW_GamesVW_Games Member Posts: 31
    Thank you very much
Sign In or Register to comment.