Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. HOW TO: Ensure the sanctity of Actions?

HOW TO: Ensure the sanctity of Actions?

Scheduled Pinned Locked Moved Help and Support
4 Posts 2 Posters 300 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Deeeds
    wrote on last edited by Deeeds
    #1

    Imagine an object with two Rotate BY behaviours, 30 degrees in each direction.

    A message receiver is hooked up. If the message received says Clockwise, that's what's done. A 90 degree rotation over 3 seconds.

    Similarly, a Counter Clockwise message initiates a 90 degree rotation for 3 seconds in the other direction.

    How do I ensure that one Rotate By finishes before another begins, regardless of when and what messages are received?

    Is there a way to queue the messages? Some other means of ensuring the sanctity of Actions?

    iTap DevelopmentI 1 Reply Last reply
    0
    • D Deeeds

      Imagine an object with two Rotate BY behaviours, 30 degrees in each direction.

      A message receiver is hooked up. If the message received says Clockwise, that's what's done. A 90 degree rotation over 3 seconds.

      Similarly, a Counter Clockwise message initiates a 90 degree rotation for 3 seconds in the other direction.

      How do I ensure that one Rotate By finishes before another begins, regardless of when and what messages are received?

      Is there a way to queue the messages? Some other means of ensuring the sanctity of Actions?

      iTap DevelopmentI Offline
      iTap DevelopmentI Offline
      iTap Development
      wrote on last edited by iTap Development
      #2

      @Deeeds you could have an array that stores the received messages, and then make a setup that takes the first value in the array(assuming you apppend the new messages), and based on the message, then triggers a rotate behavior. Then when the rotate has completed, get the array count and see if the array has any more messages, and if so, retrigger the setup. If not, then it stops.

      You would need to have the setup get triggered whenever a new index is added, but you would need to turn the “triggering” on or off based on if it is already running the setup or not. You could use behavior off when it starts, and behavior on when it finishes.

      Hopefully that make some sense lol

      D 1 Reply Last reply
      0
      • iTap DevelopmentI iTap Development

        @Deeeds you could have an array that stores the received messages, and then make a setup that takes the first value in the array(assuming you apppend the new messages), and based on the message, then triggers a rotate behavior. Then when the rotate has completed, get the array count and see if the array has any more messages, and if so, retrigger the setup. If not, then it stops.

        You would need to have the setup get triggered whenever a new index is added, but you would need to turn the “triggering” on or off based on if it is already running the setup or not. You could use behavior off when it starts, and behavior on when it finishes.

        Hopefully that make some sense lol

        D Offline
        D Offline
        Deeeds
        wrote on last edited by
        #3

        @iTap-Development Yes, makes sense, and is the same way I considered manually doing it. I'm wondering if there's a more natural, inherent and simpler manner of queueing actions.

        iTap DevelopmentI 1 Reply Last reply
        0
        • D Deeeds

          @iTap-Development Yes, makes sense, and is the same way I considered manually doing it. I'm wondering if there's a more natural, inherent and simpler manner of queueing actions.

          iTap DevelopmentI Offline
          iTap DevelopmentI Offline
          iTap Development
          wrote on last edited by
          #4

          @Deeeds yeah it was just off the top of my head...there is probably a better way, but i don’t have anything in mind right now🤷‍♂️

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Search