toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Help - Increase randomness with the score
Tiny_Studio
Member
Posts:
50
August 2013
in
Working with GS (Mac)
How can I increase randomness when the score is high? Can you help me, please?
Comments
KevinCross
London, UK
Member
Posts:
1,894
August 2013
What are you trying to randomise and how high is high?
Tiny_Studio
Member
Posts:
50
August 2013
I randomise the spawning of an actor and high would mean a score of 150
KevinCross
London, UK
Member
Posts:
1,894
August 2013
edited August 2013
How about random(1, game.Score / 150)
If your score is 300 it'll be random(1, 2)
If it's 600 it'll be random(1, 4)
etc.
Obviously replace game.Score with the correct Attribute. Change 150 in the random expression to find a suitable randomness.
EDIT: You will probably also want to floor or ceil the game.Score / 150 sum to remove decimal points.
Tiny_Studio
Member
Posts:
50
August 2013
Thank you
Sign In
or
Register
to comment.
Comments
If your score is 300 it'll be random(1, 2)
If it's 600 it'll be random(1, 4)
etc.
Obviously replace game.Score with the correct Attribute. Change 150 in the random expression to find a suitable randomness.
EDIT: You will probably also want to floor or ceil the game.Score / 150 sum to remove decimal points.