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.
Card Games

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 90
This question might not come across very well...How would you make an event where you get random results each time, or at least where it seems like you have random results? (Such as a slot machine)

What I'm wanting to do is make a little-side thing where you can gamble with these soldiers...and I'm wanting the player to actually have a chance aof winning occasionally. How might I go about doing that?
Dear children, keep yourselves from idols.

******
Rep:
Level 91
Quote from: Farquad
This question might not come across very well...How would you make an event where you get random results each time, or at least where it seems like you have random results? (Such as a slot machine)


it might have something to do with saving a random number in a variable.. nah... can't be...
holy shit my sig was big!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Which RPG Maker are you using? (Standard questions to those who haven't provided it and haven't talked about scripts)

Under event command you choose the one that manages variables.
There select random and enter the interval. If you want 4 different possibilities enter
  • and [3], or [1] and [4].


Next you create a conditional branch (also know as fork) and select the variable and an value. This way you can get some random action to happen.

Also thanks for giving me some good ideas.

Edit: I wrote switch-management instead of variable-management. :oops:

**
Rep: +0/-0Level 90
No problem. Thanks for helping with mine.  :)

I'm using 2000, by the way... I like the old school.  8)

I'm at the switch management window but I'm not seeing "random"...you are talking about the command on the first page of commands, right? Or maybe you mean the variable management command?

Sorry...as you might infer, I'm a bit of a noob when it comes to switches. That, and I'm a bit slow.
Dear children, keep yourselves from idols.

*****
MANMACHINE
Rep:
Level 91
God of Dicks
I'm pretty sure he meant variable.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
I did mean variables.... :oops:

A switch can only be assigned 2 values.
It would really be a bother trying to create any kind of random function with switches. Don't do that.
Use variables.

**
Rep: +0/-0Level 89
im not sure if dis is wat u want but improvise on it.
-1st make the necessary event maybe with the soldier saying
 "i'll deal you a card.
  if its a sun, you give me 10 bucks
  if its a moon, i give you 10 bucks
  if its a star, you give me 20 bucks
  if its a comet, i give you 20 bucks"
-then open the event commands page and select CHANGE VARIABLE
-under Choose Variable(s) check ONE and create a new variable
and call it "card game"
-under Operand check RAND and put 1 in the 1st box and 4 in the 2nd box
-click ok
-open the event commands page again and this time select FORK CONDITIONS.
-check VARIABLE and select the card game variable. check SET and put in the number 1. leave the other box as SAME. uncheck the ELSE CASE
-click ok.
-now in the space between the FORK and END click to open the event commands page and put in a message " its a sun! you lose 10 bucks"
-then open the event commands page and select CHANGE GOLD.
-check DECREASE MONEY and check SET and put in the number 10
-click ok

- now below the END CASE open another FORK CONDITIONS but this time the SET number should be 2.
-and the message should be "Its a moon, you get 10 bucks"
-in CHANGE GOLD it should now be INCREASE MONEY

-repeat for FORK CONDITIONS 3 and 4, changing the message and the gold held as appropriate.

in the end it should look like this.

<>Variable Ch:[0.0020:card game] Set. Randm[1*4]
<>FORK Optn: Varbl[0020:card game]-1
 <>Messg:Its a Sun! You lose 10 bucks
 <>Change Money: Money 10 Decr.
 <>
:END Case
<>FORK Optn: Varbl[0020:card game]-2
 <>Messg:Its a Moon! You get 10 bucks
 <>Change Money: Money 10 Incr.
 <>
:END Case
<>FORK Optn: Varbl[0020:card game]-3
 <>Messg:Its a Star! You lose 20 bucks
 <>Change Money: Money 20 Decr.
 <>
:END Case
<>FORK Optn: Varbl[0020:card game]-4
 <>Messg:Its a Comet! You get 20 bucks
 <>Change Money: Money 20 Incr.
 <>
:END Case