设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 66|回复: 0

[制作教程] How to Add a Casino Slots Mini Game EASY Tutorial

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    前天 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4456

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    22919
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    28269

    灌水之王

    发表于 前天 08:10 | 显示全部楼层 |阅读模式
    How to Add a Casino Slots Mini Game EASY Tutorial
    Tutorial by Carrigon
    sims2Workshop.com

    Full credit to CACAO for his Mini Game Scripts

    http://cacaosoft.web.fc2.com/

    Beginners Level Tutorial:

    This tutorial will show you how to add a mini Casino Slots game to your own game.  I don't even have to translate this one.  I can show you how to add CACAO's Slots mini game script in a quick, easy beginner's level way.

    This tutorial uses CACAO's Casino Slots Mini Game script demo.  
    http://cacaosoft.web.fc2.com/tkool/script/rgss3/pslot.html

    Yes, he does allow shareware use of his script for your games, but you must give him credit and a link back to his site and TOS.  
    http://cacaosoft.webcrow.jp/rule.html
    http://cacaosoft.web.fc2.com/

    What you will need:  You must download CACAO's demo from here:
    http://cacaosoft.webcrow.jp/sample/file/rgss/pslot_ace.zip

    The reason I want you to download his demo, even though you probably don't speak Japanese, is because you will need both the script and the picture files from it.  Plus, his examples will show you more ways to work with the code.  Even if you don't speak the language, you should look at his examples if you want to try different things from what I'm going to show you.  Get the demo, don't just get the script because without his picture files, it's just going to error on you, unless you're experienced enough to know where to take that out of the code.

    Step one:  Download the demo from CACAO's site.  

    Step two:  Copy the script into your game from the demo.  Put it in the usual place, under Materials, but above Main.  Copy the picture files into Graphics/Pictures.  

    For this tutorial, we aren't actually using the pictures at all.  We are using your iconset.  For beginners, that's the pictures you use when you make a new item in the game.  To find the number of each icon picture, go into items, click on where you would change the item's picture, you will see how the icons are numbered.  You can use any icons you want to or even make your own on your icon sheet.  This tutorial only uses eight icons.  They can be done in any order you like.  

    To edit the script:  We are using the section CACAO calls Pattern 2.  This is what we are calling in the event.  Look for this:

    PATTERN[2] = [  # ????
        :icon, nil, "", "",
        [184,185,186,187,188,189,190,191],
        [191,188,186,190,187,184,189,185],
        [188,184,189,191,186,190,185,187],

    The numbers are your icon numbers on your icon sheet.  Pick eight icons you want to use.  Change the numbers here.  Follow how it was done here.  The first line is your first row for the slots.  See how the second line uses the same numbers, but your icons are now moved.  Follow doing it this way for all rows, no matter what icon numbers you are using.  Like if you're using fruit, you have grapes, lemons, apples for the first row, then for the second row you would have lemons, grapes, apples and so on.  It is important to follow how this was done here or your slots probably won't work right for you.  They won't line up right.


    Step three:  Most all the coding is done in the Event.  I'll give you a screenshot from my game of how to do it.  

    The only things I've edited in the script  for my game were to put my own icon numbers in, and to change the speed of how fast the slots go.  This is a really important point to remember.  Everyone's computer may not be the same speed.  You might have a player whose pc will run this so fast that it's impossible to play the slots.  Or you could get someone whose pc is slower.  It's really best to set the speed to one.  You can experiment with that.  I would recommend adding an option for the player to skip the puzzle in case they really cannot do this on their pc.  I've included that in my event.

    You can edit the speed in the script here:

     DEFAULT_SPEED = 4

    I changed that to a 1.

    Basically, my event has it set so that when the player wins, my game switch is turned on.  And then I give them an option to play again unlimited for fun and gold.  For my game, I'm using fruit icons.  I'll also tell you the trick to winning if it's going by a bit fast, look at the icon that comes before the one you need to click on, click when you see that one and most of the time you can get it.


    This is what we are calling in the event:

    start_pslot(2, pos: 2)
    p SceneManager.result

    But you need to look at how I did it in my screenshot.  If you follow my event exactly, you shouldn't have any problems with this at all.  It will do what it's supposed to do.  And there are many things you can do with the event.  You can give your player a prize on winning instead of just turning on a switch.  My way is just a typical game event way.  

    To learn other things you can do with the script, study CACAO's examples in the demo.  You can add pictures, you can make it look like a real slot machine.  There are other ways of controlling the speed of the slots and he gives examples of that.  

    CACAO's script fully supports using a mouse, if you have a mouse script working in your game, just put the mouse call at the top of the event.  See my event screenshot.

    Screenshots here:

    My Event:



    Game Screens:










     



       

     


    本贴来自国际rpgmaker官方论坛作者:Carri处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/how-to-add-a-casino-slots-mini-game-easy-tutorial.34381/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-14 15:47 , Processed in 0.066281 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表