Trigger Once not working

This forum is currently in read-only mode.
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hello People!

    Well like the Title of this Topic says, for some very weird reason the "Trigger Once" command doesn't work. (either that or I'm dumb XD ).

    <img src="http://i.imgur.com/iHQRc.png">

    ^ That's the event, and I can't seem to find the Mistake. What it does is making the "Speech Layer" appear right from the start of the Frame, but not after 10 Seconds.

    Any Idea's how I can fix this? Any help would be greatly appreciated!

    Regards,

    Mr. Snooley

  • Well first you have to ask 10 seconds since what, or more importantly the system has to ask that since its a system action. In other words the system thinks 10 seconds has already passed. Also Trigger once(while true) isn't designed to work in the same condition, better to put it in a sub event, but again since every x milliseconds is a system action it will always be true.

    Might want to take a look at the Function object... Call function after delay, or one of the other timer type objects, timeline, etc.

    Edit:

    Yeah what Tulamide said, except I didn't think about the fact it starts at 0.

  • The "every x ..." is a loop. It triggers the event on every 10000ms in your case. So the event will be triggered on 0ms, 10000ms, 20000ms, etc.

    Combinig this with trigger once is odd, but what at least happens is that the event is triggered first on 0ms.

    If you just want to make the layer visible after 10 seconds of the layouts playing time has passed, system compare against the timer:

    +Timer greater than or equal 10000

    Trigger once

    ->your actions

    I wouldn't use "Timer equal to", because it is not guaranteed that you will catch the exact moment of 10000ms

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey thanks, that with the Timer eagual / greater than 10000 worked!

    Just one little Question, is the "Timer" the timer of one Layout or of the whole Application? If it is the latter then this would logically not work.

    Thanks alot people!

    Regards,

    Mr. Snooley

  • Hey thanks, that with the Timer eagual / greater than 10000 worked!

    Just one little Question, is the "Timer" the timer of one Layout or of the whole Application? If it is the latter then this would logically not work.

    Thanks alot people!

    Regards,

    Mr. Snooley

    Puh you caught me in the last minute, I'm almost out of the door

    Everything related to a layout is resetted, when the layouts are switched. That's why the timer counts from zero everytime you switch to another layout (or just call the same layout again). The method is safe for your needs

  • Very nice, thanks alot!

    Greatly appreciate it.

    Mr. Snooley

  • [quote:36bguidd]I wouldn't use "Timer equal to", because it is not guaranteed that you will catch the exact moment of 10000ms

    Actually go ahead and use "Timer equal to" because according to construct's source, this:

    +Timer equal to 10000
    ->your actions[/code:36bguidd]
    Behaves exactly the same as:
    [code:36bguidd]+Timer greater than or equal 10000
    Trigger once
    ->your actions[/code:36bguidd]
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)