differences between triggered and fast triggered

This forum is currently in read-only mode.
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • long ExtObject::cMyCondition(LPVAL params)


    if (x==5)

    {return true;}




    without any flags, the event sheet would go in order, and when it reached a cMyCondition if x was 5, it would return true and perform the actions, correct?

    triggering triggers the condition at any time, and not just in linear order?

    if so, what's the difference between triggered and fast triggered?

    inline void CRunObject::TriggerEvent(int cndIndex)[/code:2vg7fj7u]
    after adding the CND_TRIGGERED flag to the ACE,  I suppose I use TriggerEvent for triggered in any ACE or custom member function, but what do I put for cndIndex
    and how would I trigger a fast trigger
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't bother with fast triggers, they were written to support an algorithmically efficient version of the 'on loop' conditions which didn't slow down when other unrelated 'on loop' conditions are present. To achieve this they cut a lot of corners ranging from not performing object picking to ignoring the first parameter... essentially, they're not useful for plugins.

    To trigger a condition pass the index of the condition. ADDCND() in the ACE table adds the condition to a list, so it's the zero-based condition you have in your ACE table.

    Triggering a condition does what you said pretty much, it executes all events with the trigger condition in top-to-bottom order in the event sheet immediately testing all conditions and running all actions and subevents, all done immediately within the function. As you'd expect if the trigger routine (cMyCondition) returns false, that trigger does not run. Note in your example not all control paths return a value, so you probably want a 'else return false' in there!

    If you trigger an event from within an action, condition or expression, call pRuntime->NewSOL() before it and pRuntime->RestoreSOL() after it. Otherwise, conditions and picking in the trigger event will affect picking in the event that caused the trigger.

  • thanks ash

    this didn't seem worthy of it's own thread,

    but is it possible to make a combo parameter have "|" in one of the choice names?

    for the bitmapped text, I want to include the entire ascii set as possible characters

    but since | separates the options, I think I might just have to write "or" or something

  • No, sorry, there's no way to have | as an option... I think it's called the 'pipe' character though.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)