Growing Actor until it touches other actor

pmanacaspmanacas Member Posts: 1
edited November -1 in Working with GS (Mac)
Hi, I'm stuck with this.

I have a scene with collidable walls and balls of different sizes scattered around.
I need to spawn a new ball actor and grow it until it touches either a wall or another of the existing balls.

I know how to grow the actor using a variety of means (interpolate, timer with change width and height, resize actor...) but can't find a way to make it stop growing when it touches another actor.

help with be very much appreciated :-)

thanks Pedro

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Here is one (of probably many):

    Timer (every .025 seconds)
    --When actor overlaps or collides with actor of type wall
    ---- (its blank here)
    --Otherwise
    ----Change Attribute: self.Size.Width To: self.Size.Width + 10
  • micksolomicksolo Member Posts: 264
    hey there, i had the same problem in one of my games. Basically collisions don't work when actors are changing size, one of the limitations of GS. What you need to do is to set a state for the actor that changes when it touches the wall.

    For example

    When actor of type Ball touches actor of type wall
    Chg attribute State - 2

    Then a seperate rule
    When attribute state = 2, (stop getting bigger, apply gravity, etc)
Sign In or Register to comment.