whitkin's Forum Posts

  • I have a metronome sprite with one 60-frame looping animation. I want to start and stop the animation playing with keyframes on the timeline (not in events sheet).

    Is this possible?

    I tried...

    1. creating a 2nd animation (a single frame) and setting keys for "initial animation" property. The animation changed once, but later keys were ignored.

    2. setting keys on a boolean variable (see attached image) and in event sheet, check it every system tick, and played animation if boolean is set, and stop if not. That created flaky behavior - animation played slowly, and didn't stop when boolean was cleared

    (what I wish for is a play/pause sprite property that I can key on the timeline)

    My fallback plan is don't use timeline, just hardcode timing in events e.g. play anim, wait 5 sec, stop anim, wait 2 sec, play anim

  • rex_csv2array plugin worked fine in my test in c3 (c3p). Please provide a very simple test c3p file to reproduce your issue, thanks.

    I did not find this c3p file. I am looking for a simple example how to use your plugin to read a .CSV file and set to array. thank you!

  • FYI, for others with my issue, there is a new feature in the latest (stable) release "Wait for previous actions to complete." Not sure how it interacts with various parallal processes (e.g. tween) but hopeful this is a useful new tool. Looking forward to trying it.

  • FYI, for others with my issue, there is a new feature in the latest (stable) release "Wait for previous actions to complete." Not sure how it interacts with various parallal processes (e.g. tween) but hopeful this is a useful new tool. Looking forward to trying it.

  • oops. I edited original to include josh at whitkin dot com

  • I'm interested in developing playable ads too. Maybe we can help each other? Happy to chat - josh at whitkin dot com.

  • I'm an experienced game designer learning to code in Construct by building a card game. I'd like a C3 programmer to review my code, help me solve bugs and suggest best ways to achieve certain effects and features.

    Good english is needed.

    I can pay a little, but this is indie / personal project.

    If we like each other, I hope we can work together in the future. I have paid many programmers on game projects in the past.

    My contact info is josh at whitkin . com . full info at www dot whitkin . com

    -Josh

  • What is your email, skype, website, etc?

    Did you find help? I can help.

  • I've got a line of cards in a family, and they move every few seconds. As they go away, I'd like the remaining cards to move a little to fill the gaps.

    Is there any way to call the "arrange/space/vertical" ability that I can do in the layout right-click, but as an action ?

  • the way I like to delay actions is to make a global variable to indicate that some kind of sequence is running - so that when the sequence is over, nothing is happening (other than checking if a sequence is running).

    and I use a variable "Delay" set to how long to wait. Every tick dt is subtracted from it, so when it gets down to zero, the next step can take place. that step then sets the length of the delay until the next step or marks the sequence as complete.

    THANK YOU!

    Of course, an idea this good will generate questions :)

    Do you see any way to make your idea more readable? the nested subevents make it very hard to follow the flow of the actions. (Wait is very easy to read - I'll say that for it... :)

    -Josh

  • I think the dt countdown hassle is what I really need, and wait is seductively simple but ultimately not the right solution.

    I FINALLY found a deep official discussion of wait:

    construct.net/en/tutorials/how-to-use-the-system-wait-action-63

    Here's a sample:

    "The Wait action saves which objects are picked and cancels the current event. When the wait time has expired or it is signalled, the picked objects are restored as they were when the wait started (minus any objects that got destroyed), and the event is resumed from the action following the wait action. It continues to run any subevents as well. At any point if another wait action is encountered, the same save-picked-objects-and-wait process happens, so you can make different parts of an event run at different times."

  • Big ups for replying in detail! I'm ...kinda...getting it...

    DL;DR

    Q: I want a sequential conditional ( if/then/else structure) that runs slowly (2 seconds between conditions) so the player can see if/else block execute.

    A: For if/then/else, use sub-events, nested elses. to slow it, make each sub-event set a variable and add conditions to nested levels that check it. If you want real-time, set and compare using the system clock ('it's been 2 seconds since the last action ran').

    I just made up most of those words in that last sentence. Are there standard terms I should have used?

    DETAIL:

    Regarding wait: "The whole function is executed in one tick, but some actions from it are scheduled to run later. "

    Gah! So confusing for me! It feels like it breaks the "everything is sequential" idea that Ashley stated in an earlier reply to this thread.

    Is wait the only action that does this? Does it work like tween does?

    Is there a list of actions that do and don't complete somewhere in the docs?

    So, now I'm wondering if it's possible to create new action. I'll call it a 'delay' function. Like wait, but makes Construct run the next action once the timer completes.

    Why? So I can do what I was tyring to do with wait: create a sequence of actions, and they will happen slowly, one after the other, in the same indentation block, instead of a very deep nest of sub-sub-sub events.

    I'm not asking for single-threaded wait - I understand that would freeze Construct.

    1. My 'delay' runs the next CONDITION, where 'wait' runs the next ACTION

    2. My 'delay' restores execution in the middle of a list of actions, where 'wait' skips ahead.

    How? Uhhh... naively I imagine it would make Construct push its position and pick list in the current indentation block. Then it'd break out of the block and execute the next condition, and keep running. Once the delay timer finished, Construct returns to the incomplete block, restores the pick list, and executes the next action after the delay.

    yeah, that may not make sense...maybe you advanced coders can help me grasp this.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you Ashley for the reply.

    OK, thank you for replying.

    English is too vague for coding, sometimes. I think I should post code, not describe. So here's a test:

    It creates 5 sprites at x=0,50,100,150,200. Each is followed by a 2-second wait. Sprite #1 is created in main, #2 and #3 in a function with one subevent, #4 in a second subevent, and #5 after the function call.

    So what do you think will happen here?

    I would expect the sprites to appear, one by one with a 2-second delay between each, in order from left to right, but that's not what happens.

    Reading around the forums I wonder if "wait" may be the problem, but if so, I can't grasp why wait doesn't make the code wait, or what if any workarounds I should use when I need events to happen slowly enough for users to see in sequence.

    c3p is here: dropbox.com/s/bo6ncbd7twdvxfk/sequential-test.c3p

    Thank you so much for your help. I've searched the forums but not sure what terms to search...surely it's been covered before. Please refer me to existing posts or examples if this topic is already explained somewhere else. I'll try my best to grasp that before posting more.

  • through experiments I found that booleans can be copmared to integers, so myBool= 0?"false":"true"is will print "false" if myBool is false.

  • I'm using boolean variables in an expression. Can I invert them? example, in a settext of a dialog:

    What I want:

    DOG.chews & !FAM.chews?"...":"..."

    My hack:

    DOG.chews & DOG.chews <> fam.chews?"dog chews and fam doesn't":"dog not chews, or dog chews and fam does too"