advanced expression techniques
hey guys i've looked around and while i've found definitions on th attributes and behaviors, i was wondering if anywhere there was a list of advanced uses that can be used in the expression editor such as
my favorite
"(+1)%2" used to toggle a interger attribute between 0 and 1, i use this all over the place now days
and
".." saw this in the keyboard tute video by tshirt booth, ads to a text attribute
anyone go any other modifiers you add to expressions often? besides simple add subtracts.
my favorite
"(+1)%2" used to toggle a interger attribute between 0 and 1, i use this all over the place now days
and
".." saw this in the keyboard tute video by tshirt booth, ads to a text attribute
anyone go any other modifiers you add to expressions often? besides simple add subtracts.
Best Answer
-
AcceleratedGames Posts: 201
I have a technique that is used in a bunch of ways.
vectorToAngle(self.Position.X-game.Mouse.Position.X, self.Position.Y-game.Mouse.Position.Y)
You can use this one in a "Change Attribute" behavior that changes self.Image. I use it to change the background image of my scene based on the level. The background images have to have the first letter "B", then a number for this to work:
"B"..floor( game.Level /10)
You should check out GSHelper.com. It might not be a list, but the techniques are not hard to find.