• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

MythicMobs/论坛教程/随机投掷技能

来自Minecraft插件百科
Qsefthuopq讨论 | 贡献2018年3月17日 (六) 21:12的版本 (创建页面,内容为“本教程由iTzCascadexX编写 源地址:http://www.mythicmobs.net/index.php?threads/creating-a-random-throwing-direction.5658/ ---- 我最近实现了一种能够...”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

本教程由iTzCascadexX编写 源地址:http://www.mythicmobs.net/index.php?threads/creating-a-random-throwing-direction.5658/


我最近实现了一种能够随机方向的投掷的机械.这可以让你的BOSS不再只有一种方向的矢量攻击. 为了正确地实现这一点,我强烈建议您使用“投掷(throw)”机制来创建初始速度,例如:

- throw{velocity=4;velocityY=2}

四面随机:

DirectionForward:
  Skills:
  - velocity{m=set;x=0;y=1;z=2}
DirectionRight:
  Skills:
  - velocity{m=set;x=2;y=1;z=0}
DirectionLeft:
  Skills:
  - velocity{m=set;x=-2;y=1;z=0}
DirectionBack:
  Skills:
  - velocity{m=set;x=0;y=1;z=-2}

八方随机:

DirectionForward:
  Skills:
  - velocity{m=set;x=0;y=1;z=2}
DirectionRight:
  Skills:
  - velocity{m=set;x=2;y=1;z=0}
DirectionLeft:
  Skills:
  - velocity{m=set;x=-2;y=1;z=0}
DirectionBack:
  Skills:
  - velocity{m=set;x=0;y=1;z=-2}
DirectionForwardRight:
  Skills:
  - velocity{m=set;x=2;y=1;z=2}
DirectionForwardLeft:
  Skills:
  - velocity{m=set;x=-2;y=1;z=2}
DirectionBackRight:
  Skills:
  - velocity{m=set;x=2;y=1;z=-2}
DirectionBackLeft:
  Skills:
  - velocity{m=set;x=-2;y=1;z=-2}   

现在你配置完了位置,元技能就很简单了

- randomskill{skills=DirectionForward,DirectionBack,DirectionRight,DirectionLeft,DirectionForwardRight,DirectionForwardLeft,DirectionBackRight,DirectionBackLeft}   
最终结果:
Skills:
  - throw{velocity=4;velocityY=2}
  - randomskill{skills=DirectionForward,DirectionBack,DirectionRight,DirectionLeft,DirectionForwardRight,DirectionForwardLeft,DirectionBackRight,DirectionBackLeft} 

大功告成!现在你可以使用这个强力的随机方向投掷技能了.
作者用的是最新版本测试,低版本不一定适用

  • MM 测试版本: 4.3.2
  • Spigot 测试版本: 1.12.2