Hello, I am currently working on a game and am in the need of a little help.
What I'm trying to do is this:
someone gives you 10 grams
you get 10 grams
gives you 20 grams (total 30)
parallel process changes that to
1 ounce and 2 grams
And when you take away 3
grams the same parallel process
leaves you with 0 ounces and
27 grams.
It doesn't SOUND very
complicated but believe me,
unless I'm missing something
obvious, it is.
WHAT I HAVE SO FAR:
6 variables
-1- "Unit Conversion 1 - Ounce"
-2- "Unit Conversion 2 - Gram"
-3- "Total Grams"
-4- "Unit Conversion Math
Problem 1"
-5- "Unit Conversion Math Problem 2"
-6- "Random Number"
4 events
-1- Person that gives you grams
control variable>set to
random number between
2 and 17
text: Here's \V[6] grams.
change items>add>by
variable [6]
-2- Person that wants grams
control variable [6]>set to
random number between
2 and 27
text: Can I have [6] grams
choices: yes:
conditional branch>if variable
[3] is greater than or equal to
variable [6]
then: text: Thanks.
control variable [2]> subtract
by variable [6]
else: text: Oh, Sorry.
You don't have enough grams.
no: Okay.
-3- Person that tells you amount ('ounces' and 'grams', or 'total grams')
choice: ounces AND grams
text: You have [1] ounces and
[2] grams.
total grams
You have [3] total grams
-4- Parallel Process
variable[1] set to [game
data: number of ounces in
inventory]
variable[2] set to [game
data: number of grams in
inventory]
conditional branch>
variable[2] is greater than or
equal to 28
then: change items "Ounce"
add 1
change items "Gram"
subtract 28
set variable [1] to number
of ounces in inventory
set variable [2] to number
of grams in inventory
else:
--
variable [math 1] set to 28
--
variable [math 1] multiplied by
[1](number of ounces)
--
variable [math 1] add [2]
(number of grams)
--
variable [total grams] set to
variable [math 1]
--
conditional branch: if [2] is less
than 0, then :
conditional branch: if [1]
is greater than or equal to 1,
then:
variable [math 2] set to 28
--
variable [math 2] add [2](which
will be negative when this runs)
--
change items: Ounce subtract 1
--
change items: Gram add by variable [math 2]
--
control variable [1] set to game
data: number of Ounce
--
control variable [2] set to game
data: number of Grams
What I'm trying to do is this:
someone gives you 10 grams
you get 10 grams
gives you 20 grams (total 30)
parallel process changes that to
1 ounce and 2 grams
And when you take away 3
grams the same parallel process
leaves you with 0 ounces and
27 grams.
It doesn't SOUND very
complicated but believe me,
unless I'm missing something
obvious, it is.
WHAT I HAVE SO FAR:
6 variables
-1- "Unit Conversion 1 - Ounce"
-2- "Unit Conversion 2 - Gram"
-3- "Total Grams"
-4- "Unit Conversion Math
Problem 1"
-5- "Unit Conversion Math Problem 2"
-6- "Random Number"
4 events
-1- Person that gives you grams
control variable>set to
random number between
2 and 17
text: Here's \V[6] grams.
change items>add>by
variable [6]
-2- Person that wants grams
control variable [6]>set to
random number between
2 and 27
text: Can I have [6] grams
choices: yes:
conditional branch>if variable
[3] is greater than or equal to
variable [6]
then: text: Thanks.
control variable [2]> subtract
by variable [6]
else: text: Oh, Sorry.
You don't have enough grams.
no: Okay.
-3- Person that tells you amount ('ounces' and 'grams', or 'total grams')
choice: ounces AND grams
text: You have [1] ounces and
[2] grams.
total grams
You have [3] total grams
-4- Parallel Process
variable[1] set to [game
data: number of ounces in
inventory]
variable[2] set to [game
data: number of grams in
inventory]
conditional branch>
variable[2] is greater than or
equal to 28
then: change items "Ounce"
add 1
change items "Gram"
subtract 28
set variable [1] to number
of ounces in inventory
set variable [2] to number
of grams in inventory
else:
--
variable [math 1] set to 28
--
variable [math 1] multiplied by
[1](number of ounces)
--
variable [math 1] add [2]
(number of grams)
--
variable [total grams] set to
variable [math 1]
--
conditional branch: if [2] is less
than 0, then :
conditional branch: if [1]
is greater than or equal to 1,
then:
variable [math 2] set to 28
--
variable [math 2] add [2](which
will be negative when this runs)
--
change items: Ounce subtract 1
--
change items: Gram add by variable [math 2]
--
control variable [1] set to game
data: number of Ounce
--
control variable [2] set to game
data: number of Grams