[SOLVED] Index out of bounds problem

FlowCanvas Forums Support [SOLVED] Index out of bounds problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1111
    odin
    Participant

    Hi, how can I implement this code in the node without an error ‘Input.GetTouch’ – ‘Index out of bounds’ ?

    I need something like this)

    Attachments:
    You must be logged in to view attached files.
    #1114
    Gavalakis
    Keymaster

    Hello,

    Unfortunately due to the way nodes are working, the AND node will execute both A and B regardless of whether A is false, which in this case impose a problem. Please consider using the Switch Condition to check (if Input.touchCount > 0) and after than make use of GetTouch(0).phase with a SwitchEnum flow control node:

    TouchPhase

    (Note: To set the type of the SwitchEnum node, all you have to do is to drag and drop an enum port type like ‘TouchPhase’ is on the newly created SwitchEnum node.)

    Let me know if that works for you.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #1116
    odin
    Participant

    Thank you! It works like a clock

    #1120
    Gavalakis
    Keymaster

    Great!
    Thanks for letting me know and I am really glad it works for you!

    Join us on Discord: https://discord.gg/97q2Rjh

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