Stencyl 3.4.0 is now out. Get it now!

All-In-One Boolean Blocks

Photon

  • Posts: 2697
This extensions wraps a large amount of your binary Boolean operations into two compact blocks.

The first block wraps together:
  • And
  • Or
  • Xor ("Exclusive Or," which means one value is true but not the other.)
  • Nand(Negation of And)
  • Nor(Negation of Or)
  • Xnor(Negation of Xor)

The second rolls up your equality operators (=, <, >, <=, >=) and also includes a negation option.

In the future, I may try to have them override covered blocks in the Stencyl default palette for better accessibility.

To allow Stencyl to use this, unzip the folder into "/(Your Stencyl Folder)/plaf/haxe/extensions/", open Stencyl, and go to settings to enable the extension.

Enjoy!
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

SadiQ

  • Posts: 1706
Wow...a "simple" yet very useful extension. Great job Photon.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

dripple

  • Posts: 747
Thanks, Photon. This are the little things that makes life easier.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

1MrPaul1

  • *
  • Posts: 1192
I wished to have this kind of bool and comparison blocks each time when working in Stencyl,
Thank you Photon!
really great job!

P.S.
Can you make the same block for + - * / operations?
usually I want to change minus on plus in some block constructions and needs to rebuild all blocks for it.

dripple

  • Posts: 747
Can you make the same block for + - * / operations?
I am not Photon, but here we go :)
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

rright0102

  • Posts: 7
Hi Guys,

Nice extensions. I'm just starting to learn Stencyl and some of these things have been very frustrating especially having to move blocks in and out just to change a < to a >.

So here is a request for some useful functions.
1. increment/decrement value by amount with limit ( so when a limit is reached or exceeded the value will stay at the limit)
2. check a within b of c (return a true or false if a >= b-c and a <=b+c, would be useful for inexact comparisons)
3. toggle a Boolean value (if a = true then a = false else a=true)
4. return the velocity of an object (square root (xspeed^2 + yspeed^2))

Thanks in advance, I will have to explore creating my own extensions eventually. Right now just learning the core.

dripple

  • Posts: 747
I agree, for ppl who get used to use code, the blocks are confusing and frustrating, but on the other way: they limit possible syntax error and compiler problems :-)

The 2nd bullet (a within boundaries) is something I need for a couple of my games (handling touch events and navigate my actor), maybe I implement this as an extension.

If you need this functions frequently, custom blocks are a perfect fit, so you don't have to create an extension for this. The upside of choosing custom blocks is simple: if the language behind changes (major changes in haXe or maybe turning to JavaScript or whatever), the custom blocks will continue to work.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

1MrPaul1

  • *
  • Posts: 1192
thank you much for the math blocks!
wish somehow it will be default stencyl blocks...

1MrPaul1

  • *
  • Posts: 1192
@dripple
your math block with inserted list blocks stops game compiling with unexpected errors

dripple

  • Posts: 747
@dripple
your math block with inserted list blocks stops game compiling with unexpected errors
Oops? I am using the block on my own. Can you tell me the error? Please DM me  to not over-use Photons Thread here.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper