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
→
Decreasing random numbers
Pages:
1
Decreasing random numbers
ManlyMouse
Posts: 144
May 12, 2014, 06:47:42 am
Hi guys, gotta pretty simple problem that i'm having a headache over. I'm trying to make a Russian roulette game with 1 round and six cylinders. So the behavior to see if pulling the trigger is
[choose random number 1-6]
But how do i make it so that after every shot, the odds are reduced by one?
I know more about Stencyl now.
SadiQ
Posts: 1795
May 12, 2014, 07:13:06 am
Create a number attribute and set it's value to a random number between 0 and 6
After you shoot check if the value is greater than 0 and if not decrease the value of that attribute by 1.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.
ManlyMouse
Posts: 144
May 12, 2014, 07:42:21 am
I thought it would be something easy like that, thanks!
I know more about Stencyl now.
Pages:
1