≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
New "Do Something Later" extension please?
Posted by:
(you are not logged in)
Enter the missing letter in: "Internatio?al"
(you are not logged in)
Text:
[quote][b]veganpete[/b] wrote: I've mentioned before that for me, when I use the "Do Something Later" extension, it often appears to repeat itself over and over. Sounds, event's and variable changes get stuck in a loop which breaks the game. For example. [b] Do something later (1000ms): set variable "x = 0" [/b] -What I expect to happen is: a single event which sets Variable x to 0 (after 1second delay). -What I think actually happens is: x is being set to 0 every second. I can't really figure out what's causing the issue and no-one else can reproduce the problem. Would anyone mind taking a look at the extension please to see if they can spot any reason for it - or maybe suggest how I can fix it? [b]I'd be happy to pay for your time/effort if you can get it working for me?[/b]..... *I have Win10-64 with a registered (purchased) copy of CCB (which I have re-installed), so hopefully it's not a cracked/corrupt version. Here's the default script from the coppercube site.... // This is a scripted coppercube action. // It does an action somewhen later. // /* <action jsname="action_DoLater" description="Do something later"> <property name="TimeMs" type="int" default="500" /> <property name="ActionToDo" type="action" /> </action> */ action_DoLater = function() { }; // called when the action is executed action_DoLater.prototype.execute = function(currentNode) { var me = this; this.registeredFunction = function() { me.doLaterFunc(); }; ccbRegisterOnFrameEvent(me.registeredFunction); this.startTime = (new Date()).getTime(); this.endTime = this.startTime + this.TimeMs; this.currentNode = currentNode; } action_DoLater.prototype.doLaterFunc = function() { var now = (new Date()).getTime(); if (now > this.endTime) { ccbInvokeAction(this.ActionToDo, this.currentNode); ccbUnregisterOnFrameEvent(this.registeredFunction); } } Thank you![/quote]
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