Needing help with launching objects, third object being fired from another object facing left does not have an angle applied to it

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I have a game I'm working on and I've run into an issue. When an object launches objects, only the third/last object seems to not have the correct angle applied to it. This only happens when the source object is facing left instead of right. If needed I can provide an MFA but I'd rather not just post it here on this main post.

  • The angle is based on the direction of the object so that it's visibly facing in that direction.

    Here are my code snippets for the offending objects:
    Please login to see this attachment.
    Please login to see this attachment.
    Please login to see this attachment.
    And here are the animations of these objects:
    Please login to see this attachment.
    Please login to see this attachment.
    Please login to see this attachment.
    As I said before, the errors only happen when the object is being fired in a leftwards direction. This does not happen however when only one object is being fired at a time, only when there are multiple and of the same kind. For the top event where three objects are being launched, the first two act properly but the third does not get set to the correct angle.

  • You say it isn't set to the correct angle, but what angles does the third object actually get in this situation?

    You could try launching that object on the next frame and see if that helps (just a random idea not really an "answer").

    Probably should've clarified. The third object isn't given any angle so it just faces right visually.

  • Ah okay, this makes more sense suddenly to me after seeing it in action for some reason.

    The problem is essentially a scoping issue, I think. I was able to fix it by creating a clone of the Friend Attack object named Friend Attack 2 and modifying the actions for the third shot to use that object:

    (To keep collision detection simplified you'll want to apply a Qualifier to the shots so they all can be tested against at once, so that duplicate Friend Attack object won't be too much of an issue with other parts of the Eventing.)

    Please login to see this attachment.

  • I see, do you know why the original error happens in the first place? The event works just fine when the Friend is facing the right, but it only acts up when the Friend (or any object) is facing to the left.

    If I'm not mistaken, the issue is just less obvious on the right side because the shot graphics are oriented that way.

    You can see here that the center and bottom shots are aligned to each other:

    Please login to see this attachment.

  • I can't believe I didn't notice that, but thanks for pointing it out. Is it because the same event is firing two of the same projectile? Is the second "set angle" check just not working or is it applying it to the first of the two fired objects?

  • I can't believe I didn't notice that, but thanks for pointing it out. Is it because the same event is firing two of the same projectile? Is the second "set angle" check just not working or is it applying it to the first of the two fired objects?

    Yes, I believe it's because the same event is firing two of the same projectile. Aside from having a clone of the same object, you should also be able to fix it by splitting it into two separate events, one to fire the top & center and one to fire the bottom. This should ensure the scoping is correct for the second one.

    I don't think the 3rd angle rotation set action is applying to the first launched object, because the first / top one remains oriented correctly (if it were setting it should be oriented downwards instead of upwards).

    So, I'm guessing it's technically a bug of some kind in the set angle action, but as I can't see how the internals are implemented of course, can't be 100% sure. It could be something else or could even be as-intended for some other subtle reason. It's possible that, if this is the case, splitting the event in any way won't work but that would be... surprising to me, I would think that'd have been encountered before.

    Yves could chime in maybe?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!