toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Chance Behavior
DoMan
Member
Posts:
102
June 2011
edited November -1
in
Working with GS (Mac)
One thing i really need is a chance behavior, like "2 out of 6" that the ball will turn red.
Comments
Photics
Member
Posts:
4,172
June 2011
It can be accomplished mathematically... with an expression
Change Attribute: game.Chance = random(1,6)
If game.Chance is less than or equal 2
Then run behaviors
Cool math stuff like this is covered in
The Unofficial GameSalad Textbook
. There's a lot of cool things that can be done with the expressions.
Sign In
or
Register
to comment.
Comments
Change Attribute: game.Chance = random(1,6)
If game.Chance is less than or equal 2
Then run behaviors
Cool math stuff like this is covered in The Unofficial GameSalad Textbook. There's a lot of cool things that can be done with the expressions.