BeforeRunAction / AfterRunAction

0 favourites
  • 2 posts
  • I was trying to emulate. the picking of object that were created on the same tick. like what happens when using "Spawn another object"

    on the SdkType for the Sprite, there are 2 functions BeforeRunAction(method), and AfterRunAction(method) which are essential to keep track of the instances.

    These function on the sdkTypes are called automatically by the framework for certain ActionTypes

    CallBeforeAfterHooks() { return this._actionType === 3 }

    Is there a way from the addon sdk to control, what type of action this is? or to trigger the hooks? I have been trying to reverse engineer this for a few hours, thought it might be better to ask?

    I know actionType === 1 is for User Scripts, but that is as far as i have gotten

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe you should use the AddActionHook() method for this. This method takes two arguments: an action type and a function. The function will be called when the action is done.

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