GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Collide / overlap rule not working when using change size

StrobanikStrobanik Posts: 77Member
edited 1:05AM in Tech Support
well, the title says it all. suddenly all the rules that responded to collide / overlap in an actor stopped to work. after removing the "change size" behaviour they worked again.

Comments

  • RHRH Posts: 1,079Member
    That's because the collision size/area doesn't change. It stays the same as the original size of the actor.
  • chrisalchrisal Posts: 74Member
    What you need to do is destroy the first actor and spawn a bigger version in it's place
  • POMPOM Posts: 2,599Member
    what i would do is check the size of the actor when it reaches collision and make a rule in it
    when height/weight >= the size of the collision
    change attribute "game.collision is on" to true
    otherwise - false.

    and in the other actor say that
    when "game.collision is on" = true
    do something

    or if you want it to dont do something - so add to the rule you dont want to apply:
    when ALL are valid:
    "game.collision is on" = false
    and all the other rules

    hope it helps!
  • ORBZORBZ Posts: 1,303Member, PRO
    it's a bug. p-o-m's work around looks reasonable.
  • StrobanikStrobanik Posts: 77Member
    hey, thanks for the inputs. pom's workaround would have worked, if not the actor wasn't always in different sizes when colliding. The strange thing is that the change size behaviour just had to be in the actor (inside a rule that is not active) and still f.u. the collide rule. but it's good to know that it's a bug and not something fixable. I used a timer that increases the width and height instead, seems to work now.

    big cheers
  • rebumprebump Posts: 1,058Member
    Use "change attribute" for "self.size.width" and "height" (possibly inside a timer if you want them appear to grow or shrink) and the collision works with the newer sizes. It is "change size" that is broken.
  • sebababisebababi Posts: 51Member
    I can't believe after 1 year this bug hasn't been fixed yet !!!
  • sebababisebababi Posts: 51Member
    This is really a bad, I developed a game using "Change Size" behaviour, and it was running at 60 frames per second, now in some occasions goes down to 5 frames per second, and gets all shaky, and pauses all the time. could this bug be fixed?
This discussion has been closed.