Help - Search - Members - Calendar
Full Version: JanKen RPS
RPG RPG Revolution Forums > Scripting > Event Emporium > Eventing Tutorials
Alt_Jack
Yes, Rock/Paper/scissors (or RPS), also known as Jan Ken, is now available as an obnoxious VX mini-game.
since I don't release demos (please don't complain), simply copy it down, since it's written word-for-word. Comp is computer and represents their random number, player is you and that variable corresponds to your choice. The part where it says \v [ 9 ] is the variable it has in my game, and is solely for testing; it shows you what number the computer has before asking you to make a selection, so remove it.
JanKen RPS

Comment: a/1=rock
>b/2=paper
>c/3=scissors
Label: Start
control variables: [0009]Comp = random no (1...3)
text: computer: \v[9]
show choices: rock, paper, scissors
-When Rock
control variables: player = 1
condition branch: variable Comp = = variable player
call common event: draw
text: play again?
show choices: yes, no
when yes
jump to label: start
when no
branch end
condition branch: variable comp = = 3
call common event: win
text: play again?
show choices: yes, no
when yes
jump to label: start
when no
branch end
Condition branch: when variable comp = = 2
call common event: lose
text: play again? (etc)

You get the idea (I hope). Use the comment box as a guide when making the other two (paper, scissors). If you play "match the numbers" with the variables, you'll figure it out easily.

3 additional things:

1. The "comment" section at the beginning is to remind you what corresponds with what, and should be used accordingly
2. if you're one of those people who like making pictures of everything, put in "show picture: 1" at X+ -100, then "move picture" to 0,0.
this makes the picture appear offscreen, then slide in. Simply reverse it to have hands slide in from both sides. Put it in either the common event codes or before it's called up (after the variable matching)
3. the common events (win/lose/draw) have "gold-change-increase-100", "gold-change-decrease-100", and no change (respectively)

I also probably spelled "scissors" wrong.

Anyways, I'm very tired right now, so I'll fill in the rest t'morrow. pinch.gif
sasofrass
Clever. tongue.gif

Alt_Jack
Ha. In what sense? The name is the only clever part; the rest is a pain in the sacrum. pinch.gif
RzrBladeMontage
Ooo this looks pretty cool jack! You've done it again - another fine event system! wink.gif
sasofrass
QUOTE (Alt_Jack @ Mar 5 2011, 02:42 AM) *
Ha. In what sense? The name is the only clever part; the rest is a pain in the sacrum. pinch.gif


Clever in the sense that I never thought of this to add in my game teehee.gif
Reshiram//Exe
Nice event. I might make something similar with a dice. It doesn't seem all that hard to event, or is that just me? It seems to be a few options, some conditional branches and a few comments. biggrin.gif But nice work once again.
Alt_Jack
QUOTE (Phantsmal @ Mar 5 2011, 02:54 PM) *
Nice event. I might make something similar with a dice. It doesn't seem all that hard to event, or is that just me?

Depends on your skill. It's a bit tricky to get working, but it's tedious to make (remember that I only posted a 1/3 of it). pinch.gif

Speaking of tedious, I was hoping that I could submit this to the event resouce submission...thing. Yes.
RzrBladeMontage
No problem Jack, I'll add it to the list.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.