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.
Random Items [resolved]

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 88
All work will stop and the ground will releive...
I'm working on a game in which items are made from boiling herbs found in the environment.

Is it possible to make a script which allows you to randomly find items on the ground? Like 1 out of 2-3 maps you find a item lying on the ground and you walk up to it and pick it up. I'd need it to also to only have certain items allowed to be found, and maybe to perform a check whether the map is bigger than 20x15 (my standard inside building size) before it creates the item.
« Last Edit: April 01, 2007, 10:47:54 PM by GhstHawk »
Secret of the Summit: [Working Title]
Scripts: nearly complete (need skill shop)
Storyline: complete
Database: 50%
Game Progress: 10%


****
Rep:
Level 88
Just make events player touch and make the events move quick as hell away from the character. I think thatll work.

*
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
It's possible with events. It requires variables. Basically all you have to do is have a paralell process event in the maps where you want it to be possible, and you want this paralell process to randomize a variable. Then, you give it whatever chance you want this item to appear on the map. If it is, then you just make it appear and become an option. Here is a demo. In order to demonstrate the pseudo randomness I only gave it a 1/6 probability that it won't appear, but it's easy to increase randomness or decrease it.


« Last Edit: April 01, 2007, 09:33:11 PM by modern algebra »

**
Rep: +0/-0Level 88
All work will stop and the ground will releive...
I was hoping to avoid events to make it less tedious, but I actually didn't think of having a parallel process to create the variables. I think I'm going to use Common events also to make it quicker.
Thank you.
Secret of the Summit: [Working Title]
Scripts: nearly complete (need skill shop)
Storyline: complete
Database: 50%
Game Progress: 10%