Stencyl 3.4.0 is now out. Get it now!

Utils v1.2 [Extension]

GeorgeN

  • Posts: 859
Thousands Separator
Divides a number digits into groups of 3.
This can be useful  to show scores, statistics, money, etc.

INPUT:
-a number(ex: 1000), a separator(ex: ".")
RETURN:
-a string(ex: 1.000)


Print text & text
Prints out to the console the two pieces of text combined.

INPUT:
-text.
-text
RETURN:
-nothing (prints out to the console).


Print text : text
Prints out to the console the two pieces of text with separator.

INPUT:
-text.
-text
RETURN:
-nothing (prints out to the console).


Hex as Color
Make a color from a hex triplet. (eg: FF00FF, C71585)

INPUT:
-hex triplet (eg: FF00FF, C71585).
RETURN:
-color


! Backup your game before activating extensions or updating old ones. Actually is a good practice to backup your game regularly!

HOW TO INSTALL: http://www.stencyl.com/help/view/how-to-create-engine-extension#install

Changelog:
v1.1 [09.07.2013]
-renamed Thousands Separator extension as Text Utils.
-added [Get width for Text with Font] block.

v1.2 [08.08.2014]
-renamed Text Utils extension as Utils.
-removed [Get width for Text with Font] block. (is now integrated in Stencyl)
-added [print text & text] block
-added [print text : text] block
-added [hex # as color]
-changed the icon, block colors and added help tags to each block.

« Last Edit: August 09, 2014, 08:29:36 am by GeorgeN »

dtrungle

  • *
  • Posts: 1938
Nicely done. :)

I regularly use this and I basically have to set it up each time.

GeorgeN

  • Posts: 859
[Update v1.1][09.07.2013]
-renamed Thousands Separator extension as Text Utils.
-added [Get width for Text with Font] block.

Konig Studios

  • *
  • Posts: 72
[Update v1.1][09.07.2013]
-renamed Thousands Separator extension as Text Utils.
-added [Get width for Text with Font] block.

Can you repost V1.0? Changing the name jacked up things and removes the blocks from the game when importing V1.1.

GeorgeN

  • Posts: 859
[Update v1.1][09.07.2013]
-renamed Thousands Separator extension as Text Utils.
-added [Get width for Text with Font] block.

Can you repost V1.0? Changing the name jacked up things and removes the blocks from the game when importing V1.1.

Sorry i don't keep the old versions. Forgot to mention it will remove the old blocks. Install this version and put the thousands separator block manually.

DarkTimmy

  • *
  • Posts: 462
Hey George,

Might there be a chance this is coming to the OpenFL branch?

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

GeorgeN

  • Posts: 859
Hey,

I've tested and it's working fine on OpenFL.

DarkTimmy

  • *
  • Posts: 462
Hey,

I've tested and it's working fine on OpenFL.

YES! Tested on my game and it looks like it works! Thanks so much!

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

FortySe7en

  • Posts: 304
This is super weird.
I'm trying to use it in late 3.0 build and I just can't get to see it in the extension list.
Have in mind I'm using many extensions successfully, it just never shows on the list.

GeorgeN

  • Posts: 859
This is super weird.
I'm trying to use it in late 3.0 build and I just can't get to see it in the extension list.
Have in mind I'm using many extensions successfully, it just never shows on the list.

What list? Can you provide a screenshot?
Also if you are using the Stencyl 3.1 (last builds) check in [workspace]\engine-extensions\extension name if is there. If is not you can add it manually.

FortySe7en

  • Posts: 304
Historically I put all my extensions to stencyl/plaf/haxe/extensions, not in the workspace folder (they did end up there as well though, to my surprise).
I have things like admob, charboost and others visible in a list when I open settings/extensions in stencyl, so I can enable/disable them. This did NOT show on a list when dropped in stencyl/plaf/haxe/extensions (which I always did prior to today).
Seems like I need to start using the workspace  if it works, quite surprising.

GeorgeN

  • Posts: 859
Historically I put all my extensions to stencyl/plaf/haxe/extensions, not in the workspace folder (they did end up there as well though, to my surprise).
I have things like admob, charboost and others visible in a list when I open settings/extensions in stencyl, so I can enable/disable them. This did NOT show on a list when dropped in stencyl/plaf/haxe/extensions (which I always did prior to today).
Seems like I need to start using the workspace  if it works, quite surprising.

The user made extensions where moved to the workspace folder in 3.1. Install it manually and tell me if all is ok.

FortySe7en

  • Posts: 304
It works when left in workspace folder. Thanks.

GeorgeN

  • Posts: 859
v 1.2 is out. Check it out. Neat stuff like (hex as color).

Innes

  • *
  • Posts: 1963
v 1.2 is out. Check it out. Neat stuff like (hex as color).

Great stuff. Thanks for your work on this.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.