Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Repeating functions - cant stop

Robo
Guest
Quote
2020-06-07 11:52:21

I have 2x separate non-extension 'onFrameEvent' functions I made that use all different variables and names yet they conflict with each other.

The problem seems to lie in the unregister part (I think) where they both have this - "ccbUnregisterOnFrameEvent(this.registeredFunction);"

I have noticed that when both run at the same time and one finished as expected it also stops the other one running before completion and it gets stuck in an endless loop, breaking my game.

Any solutions to this ??
Would using an extension make any difference ??


Robo
Guest
Quote
2020-06-08 06:56:01

Once again I fixed it myself - eventually...

I was using standard javascript for a register on frame event. That was my mistake it seems.

I re-coded everything into an action extension and got it to work smooth with no problems after some adjustments.
Best to always use the actions/behaviors for best results it seems for complex adjustments like what I wanted.

I can now test and run all 3 doors opening and closing at the same time off the one extension...so works good that way.


count2rfeit
Registered User
Quote
2020-06-09 00:02:31

yep, sometimes your best resource turns out to be yourself....


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact