Rule 'on chanse'
BasGoodboy
Member, PRO Posts: 310
Hey all,
I need a rule like 'when pressed this button, do: 50% chanse on this action or 50% chanse on this action.
Is this possible?
I need a rule like 'when pressed this button, do: 50% chanse on this action or 50% chanse on this action.
Is this possible?
Goodboi Gamestudios | Monster Jumper now on the App Store
Comments
In the first rule you do
When touch is pressed
Change attribute RandomAction to random(1,2)
And then in the second rule you do
When RandomAction=1
"Do your first action"
Then in the third rule you do
When RandomAction=2"
"Do your second action"
Goodboi Gamestudios | Monster Jumper now on the App Store
Then just the rules you say right?
I made this:
when RandomAction=1, change attribute game.Money to game.Money+5
when RandomAction=2, change attribute game.Money to game.Money-5
I did that, but somehow if i click the button, the first time it always gives +5,
But at the second and third click nothing changes..
The nothing change part is not what im aiming for, since there's only 2 opportunities: +5, or -5, not change nothing.
Something is not working right. Is the aimed Attribut 'RandomAction' an Integer with default 0?
Goodboi Gamestudios | Monster Jumper now on the App Store
Goodboi Gamestudios | Monster Jumper now on the App Store