Stencyl 3.4.0 is now out. Get it now!

Time Conversions

rob1221

  • *
  • Posts: 8866
I added on to one of my old custom blocks and made it into an extension with a single block.  It converts a number of the specified unit into various time formats as text.  You can use any positive number, and decimals are fine.  For example, if you input 99.5, "s", "mm:ss:cs", then your output should be "01:39:50" (1 minute, 39 seconds, 50 centiseconds).

DarkTimmy

  • *
  • Posts: 462
Tried out the Time Conversion extension and started getting errors in the latest build. Maybe I'm doing it incorrectly?

Setup like this...



gives me this:

Code: [Select]
TypeError: Error #1034: Type Coercion failed: cannot convert com.stencyl::Engine@95d80b1 to com.stencyl.models.Actor.
at Type$/createInstance()[C:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe/std/flash/_std/Type.hx:135]
at com.stencyl.behavior::Behavior/initScript()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/com/stencyl/behavior/Behavior.hx:78]
at com.stencyl.behavior::BehaviorManager/initScripts()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/com/stencyl/behavior/BehaviorManager.hx:97]
at com.stencyl::Engine$/initBehaviors()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:955]
at com.stencyl::Engine/loadScene()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:761]
at com.stencyl::Engine/begin()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:622]
at com.stencyl::Engine()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:469]
at Universal/init()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/Universal.hx:57]
at Universal/onAdded()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/Universal.hx:36]
at flash.display::DisplayObjectContainer/addChild()
at Universal$/main()[c:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe\lib/stencyl/1,00/Universal.hx:571]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/<anonymous>()
at Reflect$/callMethod()[C:\Program Files (x86)\Stencyl3_OpenFL2\plaf\haxe/std/flash/_std/Reflect.hx:56]
at ApplicationMain$/begin()[Export/flash/haxe/ApplicationMain.hx:56]
at ApplicationMain$/preloader_onComplete()[Export/flash/haxe/ApplicationMain.hx:83]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at scripts::StencylPreloader/onLoaded()[Source/scripts/StencylPreloader.hx:302]
at ApplicationMain$/onEnter()[Export/flash/haxe/ApplicationMain.hx:75]
Main Site: Donley Time Foundation Facebook Page: Donley Time Foundation
Newgrounds Links!

rob1221

  • *
  • Posts: 8866
That error seems unrelated to the extension.  Does disabling the extension stop that error?

DarkTimmy

  • *
  • Posts: 462
That error seems unrelated to the extension.  Does disabling the extension stop that error?

Yep, there must have been something up with the scene. It was entirely empty except for that one thing. I deleted the scene, made another and re-added just the above. Worked fine. Strange.

Thank you Rob!

-Tim
Main Site: Donley Time Foundation Facebook Page: Donley Time Foundation
Newgrounds Links!

Bhoopalan

  • *
  • Posts: 864
I just suggested this extension to another stencyler. But I just checked and I myself don't understand how to install it? Any idea?
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan


Bhoopalan

  • *
  • Posts: 864
Oops! I searched it in google but missed to search it in this forum. Thank you. I'll check it.
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan