We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Objects distance puzzles can’t reduce variable number?

Home Forums Puzzles Objects distance puzzles can’t reduce variable number?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #68971
    c4cc
    Participant

    I need to decide whether or not an object is destroyed when it comes into contact with another.

    I decided to reduce said object’s variable’s number (basically a health bar) if it comes into a certain close distance, using get distance puzzle as per below. Then if close enough, I want to hide the object.

    Yet the object is not disappearing even though it is repeatedly in contact with another

    mobile2436x1

    • This topic was modified 5 months, 1 week ago by c4cc.
    #68972
    kdv
    Participant

    you need to check the distance and set visibility every frame. now your puzzles are executed only once (when the app is loaded) and do nothing afterwards.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #68974
    c4cc
    Participant

    So far, it seemed to work, but I’ll run more tests and see how it goes

    Attachments:
    You must be logged in to view attached files.
    #68976
    kdv
    Participant

    it’s better use only one “every frame” puzzle for all your puzzles.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #68986
    c4cc
    Participant

    it’s better use only one “every frame” puzzle for all your puzzles.

    Thanks, I’ll keep this in mind. Do you mean, joining the puzzles together like this?

    mobile2436x1

    Also, in this updated puzzles, I’m trying to get my character to kick an enemy, thus destroying it. As you can see, I set my puzzles to hide the enemy object after the distance between puzzles determines the target is within kicking range, and when the HP is reduced to 0, or more.

    But after a few kicks, only does the enemy disappear. Why is there a lag in disappearing?

    #68987
    c4cc
    Participant

    Also, in this updated puzzles, I’m trying to get my character to kick an enemy, thus destroying it. As you can see, I set my puzzles to hide the enemy object after the distance between puzzles determines the target is within kicking range, and when the HP is reduced to 0, or more.

    But after a few kicks, only does the enemy disappear. Why is there a lag in disappearing?

    On second thought, I may have solved this issue, by differentiating between left and right kicks. So now, my character sofar seems to be able to destroy by left or right kicks individually.

    mobile2436x1

    it’s better use only one “every frame” puzzle for all your puzzles.

    So do you mean this for only my puzzles that determine damage and distance between objects?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.