- Joined
- May 24, 2023
- Posts
- 674
Well, since you can't find the "pbReceiveCoin" method, maybe it's because it doesn't exist.
As for where the player receives coins... I think this is the place?
In Minigame_SlotMachine, by the end of def pbMain:
This appears twice in Minigame_VoltorbFlip:
One appears in lines 370-374 and the other in lines 417-421.
I guess you'll have to make those additions.
In Minigame_SlotMachine lines 363-369:
In Minigame_VoltorbFlip lines 370-374 and/or lines 417-421:
EDIT: Added comments in the lines added so people understand better what they do. Change the number after the * to increase or decrease the amount of coins won with the charm.
Note: Since the slot machine doesn't add the coins won like in the voltorb flip, you have to add the extra coins won with the charm afterwards. Multiplying this by 2 would mean that with the charm, the player is winning 4 times the coins instead of the double the 2 would imply. Be aware of this detail if you are changing the amount of coins won with the charm in the slot machine.
As for where the player receives coins... I think this is the place?
In Minigame_SlotMachine, by the end of def pbMain:
This appears twice in Minigame_VoltorbFlip:
One appears in lines 370-374 and the other in lines 417-421.
I guess you'll have to make those additions.
In Minigame_SlotMachine lines 363-369:
Ruby:
old_coins = $player.coins
$player.coins = @sprites["credit"].score # Score = $player.coins + coins won
if $player.coins > old_coins
$stats.coins_won += $player.coins - old_coins
$player.coins += $stats.coins_won * 1 if $bag.has?(:SLOTCHARM) # Total coins = $player.coins + (coins won * increase)
elsif $player.coins < old_coins
$stats.coins_lost += old_coins - $player.coins
end
Ruby:
old_coins = $player.coins
@points = @points * 2 if $bag.has?(:SLOTCHARM) # Charm increases coins won
$player.coins += @points
$stats.coins_won += $player.coins - old_coins if $player.coins > old_coins
@points = 0
pbUpdateCoins
EDIT: Added comments in the lines added so people understand better what they do. Change the number after the * to increase or decrease the amount of coins won with the charm.
Note: Since the slot machine doesn't add the coins won like in the voltorb flip, you have to add the extra coins won with the charm afterwards. Multiplying this by 2 would mean that with the charm, the player is winning 4 times the coins instead of the double the 2 would imply. Be aware of this detail if you are changing the amount of coins won with the charm in the slot machine.
Last edited: