TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Randomly placing ores in my block of stone
Pages:
1
Randomly placing ores in my block of stone
00george
Posts: 161
April 19, 2012, 12:06:57 pm
Hi I have made as behaviour that will place stone up to the 60th layer but in the stone I want to ocasionly place ore. This is the behaviour I currently got. Im not sure on how to add it.
dashx747
Posts: 9
April 19, 2012, 12:18:21 pm
A solution would be to use a random number.
Inside the "repeat" box place a random number generator. Then you put the "create" line inside an "if". If random number X is bigger then 0.10, create stone, otherwise create ore (that is for a 10% chance to be ore).
Does it help?
00george
Posts: 161
April 19, 2012, 01:16:19 pm
My friend you sir are a genious I cant thank you enough.
SWATLLAMA
Posts: 1059
April 19, 2012, 08:25:25 pm
You can also do it via code mode, though I don't know if it'll work better for your purposes, .
Hail The Llama
http://www.kongregate.com/accounts/lSWATLLAMA
"Play the games" ~ The Grand Llama
It's my life goal to rickroll as many people as possible
Pages:
1