C

Casimir S

Member

Last active 2 months ago

  1. 2 months ago
    Mon Dec 28 21:00:26 2020

    The easiest way would be to add the hide action to the object itself. Also make sure that your layers are in the correct order. The object should be on top, and the interactive area under it. As soon as the object is shown, it will now catch the touch, and hide itself, which allows for the interactive area to be tapped again, which creates a loop.

    Cheers,
    Casimir

  2. Mon Dec 28 19:23:02 2020

    As far as I know, a hidden object doesn't catch touches.
    So, when your object is invisible, it won't recognize the tapping action.
    This eplains why it works the other way around.

    I'd recommend using an interactive area (which is invisible, but recognizes touches) to use as your tap-area, and then show the other object with it.

    Greetings,
    Casimir

  3. Wed Dec 23 20:04:30 2020
    C Casimir S posted in If/then, cases, or conditions .

    Hey Phil,

    I will definitely do that!

    Cheers,
    Casimir

  4. Wed Dec 23 19:45:19 2020
    C Casimir S posted in If/then, cases, or conditions .

    Hey Phil,

    In fact, I'm thinking about doing a video tutorial series on PubCoder, but in a few months, after some more experimenting.

    In the meantime, if you're stuck with something, feel free to contact me at casimir.smets@icloud.com

    Cheers,
    Casimir

  5. Wed Dec 23 18:42:17 2020
    C Casimir S posted in If/then, cases, or conditions .

    Hi guys,

    Here is a sample of some code I use in JavaScript, to show only 3 of a total of 4 objects.
    The trigger(PubCoder.Events.Run) are used on action lists.

    var showFloorObjectsNumber = Math.floor(Math.random() * 4);
    if (showFloorObjectsNumber === 0) {
    $("#obj323").trigger(PubCoder.Events.Run);
    } else if (showFloorObjectsNumber === 1) {
    $("#obj326").trigger(PubCoder.Events.Run);
    } else if (showFloorObjectsNumber === 2) {
    $("#obj329").trigger(PubCoder.Events.Run);
    } else if (showFloorObjectsNumber === 3) {
    $("#obj332").trigger(PubCoder.Events.Run);
    }

    I hope this helps!

    Greetings,
    Casimir

  6. Wed Dec 23 18:33:22 2020

    Hi Angelo,

    Could you explain more in-depth how I could achieve that?
    Because, as far as I can see, the drag actions happen at the same time, so changing the layer of the interactive area on a drag-action won't interfere with the drag actions already happening?

    Thanks for your help and time!

    Greetings,
    Casimir

  7. Tue Dec 22 16:28:15 2020

    Hi Angelo,

    Yes, exactly. I previously did it in the touch down event.
    Thanks for the clarification!!

    Greetings,
    Casimir

  8. Tue Dec 22 16:26:12 2020

    Hi Angelo,

    Thanks for your answer!
    I will definitely experiment with this!

    Greetings,
    Casimir

  9. Thu Dec 17 17:56:04 2020
    C Casimir S started the conversation Disable dragging multiple objects at once.

    Hello,

    I've created a puzzle, which works fine.
    The only problem is, users are able to drag multiple objects at once (on tablets).
    Is there a way to disable this? To allow only one drag action at a time?

    Thanks in advance for your help and time!

    With kind regards,
    Casimir Smets

  10. Wed Dec 16 14:06:47 2020
    C Casimir S started the conversation Bring object to front inside drag action.

    Hello,

    The documentation states that a drag action accepts only a "drag object" action, and nothing else.

    I have copied a "bring object to front" action from touch down, to the drag action.
    It appears there, and it works, at least in preview, iBooks mac and iPad.

    Is there a case where this doesn't work?
    Is there a reason the documentation says you can't do it, but I'm still able to?

    Thanks in advance for your help and time!

    WIth kind regards,
    Casimir Smets

View more