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

[制作教程] How To Set Up A Spike Trap

[复制链接]
累计送礼:
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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    I have searched the forums and the net, and was unable to find a direct answer. Now that I have figured it out I though I would share. There may be a better way to do this, and if so, please share and I will update and credit.

    On with the show...

    For this event you will want to set up 2 tabs, each set to 'Priority' Below Characters and 'Trigger' Parallel Process.

    Tab 1:


    • Set your 'Graphic' to the spikes down image (located in the !Other1 graphics).
    • Set a 'Conditional Branch' based on this 'Script' (Uncheck 'Set handling when conditions do not apply'):

      $game_player.x == $game_map.events[@event_id].x && $game_player.y == $game_map.events[@event_id].y


    • Inside the branch use a 'Flash Screen' command set to 10 frames.
    • Next we want to 'Play SE' for the damage. I used 'Damage1', 80, 100
    • Reduce the parties HP by your desired value (I used -10 HP) with the 'Change HP: Entire Party'.
    • Lastly, set 'Control Self Switch' A to On


    Spoiler






    Tab 2:


    • Set your 'Graphic' to the spikes up image (located in the !Other1 graphics).
    • Set the 'Self Switch' on the left to check if  'A is On'.
    • Set a 'Conditional Branch' based on this 'Script'(This time leave 'Set handling when conditions do not apply' checked):

      $game_player.x == $game_map.events[@event_id].x && $game_player.y == $game_map.events[@event_id].y
    • Leave the first condition blank
    • In the 'Else' condition, set 'Control Self Switch' A to Off.


    Spoiler






    You can turn it off/on through the use of a lever or switch by making a third tab:
    Tab 3:

    Leave the 3rd tab blank, but place a check in the upper left 'Conditions' with your switch enabled (1st image) and set your graphic to the spike down position. For my example it is 'Condition 085: Spike T1 Deactivated'. If you do this you will want to set up a lever, button, switch, etc. with two tabs as follows:


    • Tab 1​​For this tab, set your graphic of your choosing to what you consider to be the 'On' setting.
    • Set the 'Priority' to 'Same as Characters.
    • If using a lever, set 'Trigger' to 'Action Button'. If using a button that you step on, set 'Trigger' to 'Player Touch'.
    • Set your 'Control Switch' to the Onposition. For this example mine is: Switch 085: Spike T1 Deactivated.
    • Set your 'Control  Self Switch' to A = On.

  • ​Tab 2

    • For this tab, set your graphic of your choosing to what you consider to be the 'Off' setting.
    • On the left, check the box for 'Self Switch' A to On.
    • Set the 'Priority' to 'Same as Characters.
    • If using a lever, set 'Trigger' to 'Action Button'. If using a button that you step on, set 'Trigger' to 'Player Touch'.
    • Set your 'Control Switch' to the Off position. For this example mine is: Switch 085: Spike T1 Deactivated.
    • Set your 'Control  Self Switch' to A = Off.




    Spoiler



    Lever/Switch/Etc.

    Tab 1





    Tab 2







    How does this work?

    The first page of the event begins running as a parallel process with the graphic of the spikes down and checks to see if the condition applies. The condition has the script inside it that checks to see if the players X, Y position is the same as this event. Once the player steps on the event the condition activates which causes the screen to flash, a sound effect to play, the parties HP to reduce and then causes the event to go to the 2nd page. 

    The 2nd page has the graphic of the spikes up and is set to see if the player is still standing in that location. As long as the player stands there the page is active. Once the player moves from that location the page is turned off and reverts back to the first page, showing the spikes in the down position.

    What does the 3rd tab and lever/switch/etc. do?

    This sets it so that when you activate the lever/switch/etc. it will deactivate the traps by turning on appropriate switch on the 3rd tab of the spikes. When that tab is active all that will happen is will display the trap in the down position. You can then re-engage the lever/switch/etc. to turn the trap back on.

    References:

    I used this thread to get started with this. It is thanks to the tips, notes and questions by Mahoken, Shaz and Orathan that I was able to get this set up.


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

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 15:46 , Processed in 0.065361 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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