Joined
Sep 7, 2019
Messages
45
Reaction score
23
First Language
English
Primarily Uses
RMVXA
Can i make a slot machine skill that will have different effects depending on the symbols on the slots?
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,934
Reaction score
4,847
First Language
EN, FR
Primarily Uses
RMMZ
You will need a plugin to do that. The default engine can't accomplish that.

I've moved this thread to JS Plugin Requests. Thank you.

 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,622
Reaction score
2,000
First Language
EN
Primarily Uses
RMMZ
A non-plugin option (particularly if it's only one actor who can use this skill) could be to split it into several skills. The first skill would be the one that gets used, and could run a common event; that event would determine which of the other skills to use, via Force Action, immediately after the slots are rolled. :kaophew:

It depends a bit on how "fancy" you want the slot display to be, but if you're OK with values simply appearing on-screen, you can just use the basic Show Picture command. The event might look something like this:
Code:
◆Comment:Randomly "rolls" three slots
:       :Uses force action to make the user use a corresponding skill
◆Comment:------------------------------------------------------------
◆Comment:Slot 1
◆Control Variables:#0027 Slot 1 = Random 1..3
◆If:Slot 1 = 1
  ◆Show Picture:#1, slotValue1, Center (216,312), (100%,100%), 255, Normal
  ◆
:Else
  ◆If:Slot 1 = 2
    ◆Show Picture:#1, slotValue2, Center (216,312), (100%,100%), 255, Normal
    ◆
  :Else
    ◆Show Picture:#1, slotValue3, Center (216,312), (100%,100%), 255, Normal
    ◆
  :End
  ◆
:End
◆Wait:30 frames
◆Comment:Slot 2
◆Control Variables:#0028 Slot 2 = Random 1..3
◆If:Slot 2 = 1
  ◆Show Picture:#2, slotValue1, Center (416,312), (100%,100%), 255, Normal
  ◆
:Else
  ◆If:Slot 2 = 2
    ◆Show Picture:#2, slotValue2, Center (416,312), (100%,100%), 255, Normal
    ◆
  :Else
    ◆Show Picture:#2, slotValue3, Center (416,312), (100%,100%), 255, Normal
    ◆
  :End
  ◆
:End
◆Wait:30 frames
◆Comment:Slot 3
◆Control Variables:#0029 Slot 3 = Random 1..3
◆If:Slot 3 = 1
  ◆Show Picture:#3, slotValue1, Center (616,312), (100%,100%), 255, Normal
  ◆
:Else
  ◆If:Slot 3 = 2
    ◆Show Picture:#3, slotValue2, Center (616,312), (100%,100%), 255, Normal
    ◆
  :Else
    ◆Show Picture:#3, slotValue3, Center (616,312), (100%,100%), 255, Normal
    ◆
  :End
  ◆
:End
◆Comment:Decide result value (determines which skill to use)
:       :  - note: result value is 1, 2, or 4 here
◆Control Variables:#0030 Result = 1
◆If:Slot 1 = Slot 2
  ◆Control Variables:#0030 Result += 1
  ◆
:End
◆If:Slot 1 = Slot 3
  ◆Control Variables:#0030 Result += 1
  ◆
:End
◆If:Slot 2 = Slot 3
  ◆Control Variables:#0030 Result += 1
  ◆
:End
◆Comment:Testing!
◆Text:None, Window, Bottom
:    :Slot values: \v[27] \v[28] \v[29]
:    :Result: \v[30]
◆Comment:Fade out slot pictures!
◆Move Picture:#1, Center (216,312), (100%,100%), 0, Normal, 30 frames
◆Move Picture:#2, Center (416,312), (100%,100%), 0, Normal, 30 frames
◆Move Picture:#3, Center (616,312), (100%,100%), 0, Normal, 30 frames
◆Comment:Use skill corresponding to result value~
◆If:Result = 1
  ◆Force Action:Marsha, Attack, Last Target
  ◆
:Else
  ◆If:Result = 2
    ◆Force Action:Marsha, Fire, Last Target
    ◆
  :Else
    ◆Force Action:Marsha, Spark, Last Target
    ◆
  :End
  ◆
:End

If you'd like something more intricate, you might be interested in Yanfly's Action Sequences. I described something kinda similar over in this thread (still involves making a common event):
 

Latest Threads

Latest Posts

Latest Profile Posts

Just a little close up shot...
w2xZocX.jpg
finally drew the last member of "team outcast" for my game. since my game has a lot fighting game elements in it, there's bosses in teams of three like King of Fighters.
Run Script Calls & Play Unique Sound Effects With Each Skill & Item | RPG Maker News #113

Let's continue making our game in MZ! Touchfuzzy is... still eventing... though this time we may be working on eventing some tutorial stuff for our players!

I work late on the game so I sleep in then I wake up late so I have to work hard to make up for sleeping in meaning I work late again and sleep in again... what a nasty cycle.

Forum statistics

Threads
113,848
Messages
1,077,916
Members
147,926
Latest member
DrimCr
Top