Collision Error ... ... SON OF A -!

OkyshoOkysho Member Posts: 158
edited November -1 in Working with GS (Mac)
Just when I thought I was about ready to finally get into the level design, I encounter one last logistical error.

First one, which is one I just discovered, is a collision error between my "SUPER-EPIC-LASER" and my enemy actors. When the laser hits the enemy, it's supposed to destroy the actor (because... you know, if you got hit with a giant laser you'd totally survive with a whole through your body). The problem, is that it just doesn't happen. The big super-duper laser just passes the enemy and nothing happens. As additional info, I should point out that the Laser stretches, rather than just flies forward at X velocity.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Okysho said:
    Just when I thought I was about ready to finally get into the level design, I encounter one last logistical error.

    First one, which is one I just discovered, is a collision error between my "SUPER-EPIC-LASER" and my enemy actors. When the laser hits the enemy, it's supposed to destroy the actor (because... you know, if you got hit with a giant laser you'd totally survive with a whole through your body). The problem, is that it just doesn't happen. The big super-duper laser just passes the enemy and nothing happens. As additional info, I should point out that the Laser stretches, rather than just flies forward at X velocity.

    im pretty sure when you interpolate size, the collosion area stays the same and doesnt stretch out like the image
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    The other thing to remember is that GS will never detect a collision between two non-moving actos. one of them must be moving.
  • OkyshoOkysho Member Posts: 158
    JohnPapiomitis said:
    im pretty sure when you interpolate size, the collosion area stays the same and doesnt stretch out like the image

    Actually I'm not using the interpolate command at all. I'm manually stretching the actor using a timer:
    timer: 0.01 seconds
    [self.width = self.width + 15]
    using a modified version of the health bar tutorial, constraining the position of the laser to the player's x
  • OkyshoOkysho Member Posts: 158
    scitunes said:
    The other thing to remember is that GS will never detect a collision between two non-moving actos. one of them must be moving.

    really? This I wasn't aware of.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Okysho said:
    really? This I wasn't aware of.

    yeah it drove me crazy for hours one day!
  • AsymptoteellAsymptoteell Member Posts: 1,362
    so if I make a character slightly moving, it will collide better?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Asymptoteell said:
    so if I make a character slightly moving, it will collide better?

    No. What I mean is that if two actors both have their movable setting UNchecked GS will never detect a collision or overlap. For example you can constrain the x and y of an actor to touch and it will follow your touch even with movable unchecked. But GS will not detect when it overlaps over non-movable actors. The same is true if you interpolate a non-moving actor.
  • OkyshoOkysho Member Posts: 158
    I hate to revive this because it's really sunk down over the course of the day, but that information actually doesn't really help me because both the actors in question are already checked as movable...

    I'll post pictures:

    Laser rules
    http://i46.photobucket.com/albums/f101/Okysho/Screenshot2011-02-07at105837AM.png

    There's also a timer I didn't include in the screenshot that destroys this actor after 2 seconds.

    I'm not going to take a screenshot of the enemy actor, because all the other collisions work except this one.
    The collision rules for that actor are
    if ANY:
    collision with left laser, right laser or up laser
    destroy.

    That's it.

    Thanks for the help!
  • JillSaladJillSalad Inactive, Chef Emeritus Posts: 43
    Hey Okysho!

    I've passed this along to our CS team. Thanks for your patience!
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Collision also have problems with constrained actors.

    Try this: delete the constrain attributes and in the timer rule put both the width and the position change attributes. Something like this usually work:

    image
  • OkyshoOkysho Member Posts: 158
    MarkOnTheIron said:
    Collision also have problems with constrained actors.

    Try this: delete the constrain attributes and in the timer rule put both the width and the position change attributes. Something like this usually work:

    image

    Thanks Mark, I'll give this a try. I didn't know constrains caused collision errors.

    Wow, a GM responded to one of my threads. I feel really special now. I found a GS feature.

    Thanks Jill!
Sign In or Register to comment.