RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
(request) Randomness ensues

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
How would I make something like say a bush, that you walk up to, and it asks if you want to forage, and you can get 5-10 berries, and 5 different kinds.
How would I do that.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Use variables. They have an option where you can randomize a number between two bounds. In your case, you would use two variables. The first one would choose between 1 and 5 and then based on those numbers, you would assign what type of berry you find. Then you could reandomize another number between 5 and 10 to determine how many berries you get.

There are a few tuts on variables out there. Look them up. You won't regret it.

EDIT:
Your event would look like this. It would be action key activated with an empty second page (conditioned on Self-Switch A)


Text: Would you like to Forage?
Show Choices (yes, no)
When [yes]
    Control Variables: [001: Berries 1] Random (0, 4)
    Control Variables: [002: Berries 2] Random(5, 10)
    Conditional Branch: Variable [001: Berries 1] = 0
        Change Items: [Red Berries] + Variable [002: Berries 2]
    Branch END
    Conditional Branch: Variable [001: Berries 1] = 1
         Change Items: [Blue Berries] + Variable [002: Berries 2]
    Branch END
    Conditional Branch: Variable [001: Berries 1] = 2
         Change Items: [Black Berries] + Variable [002: Berries 2]
    Branch END
    Conditional Branch: Variable [001: Berries 1] = 3
        Change Items: [Purple Berries] + Variable [002: Berries 2]
    Branch END
    Conditional Branch: Variable [001: Berries 1] = 4
        Change Items: [Orange Berries] + Variable [002: Berries 2]
    Branch END
    Control Self Switch [A] ON
When [no]
    Text: Come back later
Branch END
« Last Edit: April 03, 2007, 02:34:55 AM by modern algebra »

***
Rep:
Level 88
I have pk so things look different, i get the concept, but ive never used variables...

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Two tutorials. One by me, one by Yami. Variables are incredibly useful. Learn to use them or else your first born child will be afflicted with a random, but life-threatening, disease.

http://rmrk.net/index.php/topic,11826.0.html
http://rmrk.net/index.php/topic,14157.0.html

***
Rep:
Level 88
Ok.....variables isnt helping.....
I had it set to random 5/10 and i only got 1 berry....
I cant get the hang of them

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
you probably added the wrong variable i'd think. See if that's the problem. If not, I'll post a demo

***
Rep:
Level 88
Could I pm my game to you?
It'll have what i did in it.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member

***
Rep:
Level 88
Dont feel like using an upload site...

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I'll get it when I am back home. Expect it back in about an hour.