C3 runtime: Calling this._StopTicking(); causes error

0 favourites
  • 7 posts
From the Asset Store
7 Errors
$15 USD
7 Errors is a game where you have to find the 7 mistakes before time runs out. Can you find all 7? Have fun looking.
  • I have a behavior that I need to tick, but obviously I want it to stop ticking when not needed.

    So I call this._StopTicking(). This works fine until I add another instance (or object with the same behavior) into the layout, then I get this.

    Uncaught (in promise) TypeError: Cannot read property 'Tick' of undefined
     at C3.Runtime._BehaviorTick (runtime.js:1)
     at C3.Runtime.Step (runtime.js:1)

    I also have an action where I call it and the action causes no errors. I tried putting it into a trigger condition but that didn´t help. I also checked the "this" and there doesn´t seem to be anything wrong with it. Is it a bug or did I overlook something?

    I´m calling it in instance.js inside the Tick() function.

  • I can't see any reason this would happen. I think I'd need to see running code to investigate.

  • Here´s the plugin and the project I´m testing it with.

    wackytoaster.at/parachute/wTween.zip

    Also while I´m at it, when I´m calling a trigger like you described in the documentation

    C3.Behaviors.wackytoasterTween.Cnds.tweenComplete

    It calls it for both behaviors on the sprite (causing that jerky motion), but obviously I want to call it for a single one. How can I do that?

    Cheers!

  • What do I do to reproduce the problem? If I install the addon and open wTween.c3p it runs fine with no errors.

  • The c3p is setup to produce the error. But I think I figured it out... I´m still on the stable release where that error does occur (or should occur when you just start the project) while it appears to be fixed on the latest beta and works fine. I guess you instinctively used the latest version? Could have thought about trying that earlier but it didn´t cross my mind.

    Now I just need to figure out the trigger thing.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As per the bug report guidelines you should only test the latest version to avoid reporting issues we've already fixed. Likewise I always test the latest version.

  • My b. But I still don´t get the Trigger thing. I´m calling

    this.Trigger(C3.Behaviors.wackytoasterTween.Cnds.tweenComplete);

    and I have this setup

    But it will Trigger both wTween and wTween2 on complete, but I don´t see why.

    EDIT: I guess I kinda hacked my way around it, it feels hacky but ¯\_(ツ)_/¯

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