OK the setup for this is relatively straight forward, but you'll have to figure out just exactly how many denominations of gold you want to dispense. Lets assume the answer is 3....in the amounts of 50 gold, 100 gold and 300 gold.
We need two events...and a counter to track things.
Lets call the counter "gold measure".
In the first event, we give the counter a number randomly.
So, make the event 'always on' and use the 'generate random counter value' command and apply it to the "gold measure" counter. Make the max value a 3, meaning SOM will randomly pick a number of 1, 2 or 3. (You could go higher like 60 and make 1-20 equal to 50 gold for example, but it really shouldnt change things much).
Now if you don't want this counter constantly changing every second, also add the 'control active leaf' command and tell it to move forward in this event, and that will lock whichever counter value was selected.
OK so we have our counter being randomly generated...now we need the inspect a bag event.
create a second event on the bag and have it activated upon inspecting the bag. We will process the event commands as follows:
IF (counter value =1)
Change Player Parameter (amount of gold increased by 50)
Display Message (you found 50 gold)
Otherwise
If (Counter value =2)
Change Player Parameter (amount of gold increased 100)
Display Message (you found 100 gold)
Otherwise
If (Counter value =3)
Change Player Parameter (amount of gold increased 300)
Display Message (you found 300 gold)
End If
End If
End If
Control Active Leaf (this event move forward)
Then on the second leaf juts do a display message (empty).
Thats all there is to it, enjoy.
We need two events...and a counter to track things.
Lets call the counter "gold measure".
In the first event, we give the counter a number randomly.
So, make the event 'always on' and use the 'generate random counter value' command and apply it to the "gold measure" counter. Make the max value a 3, meaning SOM will randomly pick a number of 1, 2 or 3. (You could go higher like 60 and make 1-20 equal to 50 gold for example, but it really shouldnt change things much).
Now if you don't want this counter constantly changing every second, also add the 'control active leaf' command and tell it to move forward in this event, and that will lock whichever counter value was selected.
OK so we have our counter being randomly generated...now we need the inspect a bag event.
create a second event on the bag and have it activated upon inspecting the bag. We will process the event commands as follows:
IF (counter value =1)
Change Player Parameter (amount of gold increased by 50)
Display Message (you found 50 gold)
Otherwise
If (Counter value =2)
Change Player Parameter (amount of gold increased 100)
Display Message (you found 100 gold)
Otherwise
If (Counter value =3)
Change Player Parameter (amount of gold increased 300)
Display Message (you found 300 gold)
End If
End If
End If
Control Active Leaf (this event move forward)
Then on the second leaf juts do a display message (empty).
Thats all there is to it, enjoy.
- Todd DuFore (DMPDesign)
Site Founder
Site Founder