Tuesday, August 7, 2012

Construct 2 Behavior Switch Solved & WebGL


What an exciting day!  I finally got past that whole "How do I switch between the Platformer Behavior and 8-Way Movement Behavior" problem.  Turns out, setting up a simple toggle did the trick.  Basically, you set up a variable and tell it to:
  •   Make a variable called FlyToggle
  •   Every time you hit the F key, add 1 to FlyToggle
  •   0 = Platform On/8-Way Off
  •   1 = Platform Off/8-Way On
  •   If you get to 2, then reset number to 0

Now I can just hit the F key and it will flip back and forth between the two behaviors.  It even works in mid-jump and mid-fall.  Kind of awesome.  

If that wasn't enough, Scirra released another example of the WebGL enabled graphics coming up in the 100th release of Construct 2.  Its really producing some incredible effects in Google Chrome.  I'm really hopeful that it will help me to achieve the silhouette effect I was working towards when I first started this.  It might afford me the option of doing some cool things stylistically.

Check out the test here:  Rain Demo


No comments:

Post a Comment