> For the complete documentation index, see [llms.txt](https://hamsterbaron.gitbook.io/hamsterbaron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hamsterbaron.gitbook.io/hamsterbaron/mechanic-guides/trigger/alltriggerlist.md).

# 可用触发器概览

## 可用触发器概览总表

下表列出了当前 Arcana 全部可用的触发器类型，可通过点击特定触发器ID来查看该触发器的详细信息页面和简单的使用案例。持续性质的触发器可以使用 ReverseAction 退出动作组。有关于触发器的特殊返回值，请查阅其详细信息页。有关于仅可用于特定触发器的条件和变量，请参阅条件块中的相关页面。

<table><thead><tr><th width="121">触发器名称</th><th width="239.66668701171875">触发器ID</th><th width="291.6666259765625">触发条件简述</th><th width="90" data-type="checkbox">持续性</th></tr></thead><tbody><tr><td>命中生物</td><td><code>ON_HIT_ENTITY</code></td><td>子弹命中一个实体时触发</td><td>false</td></tr><tr><td>命中方块</td><td><code>ON_HIT_BLOCK</code></td><td>子弹命中一个方块时触发</td><td>false</td></tr><tr><td>击杀生物</td><td><code>ON_KILL_ENTITY</code></td><td>杀死一个实体时触发</td><td>false</td></tr><tr><td>被击中</td><td><code>ON_HIT_BY_TARGET</code></td><td>玩家被 TacZ 弹药实体击中时触发</td><td>false</td></tr><tr><td>开始装弹</td><td><code>ON_PRE_RELOAD</code></td><td>玩家开始一次装弹动作时触发</td><td>false</td></tr><tr><td>结束装弹</td><td><code>ON_POST_RELOAD</code></td><td>玩家完成一次装弹动作时触发</td><td>false</td></tr><tr><td>手持武器时</td><td><code>ON_MAIN_HAND</code></td><td>玩家拿起该武器/手持武器时触发</td><td>true</td></tr><tr><td>副手持有时</td><td><code>ON_OFF_HAND</code></td><td>该武器处于玩家副手时*</td><td>true</td></tr><tr><td>处于物品栏</td><td><code>ON_HOT_BAR</code></td><td>该武器处于玩家物品栏时*</td><td>true</td></tr><tr><td>刺刀攻击</td><td><code>ON_MELEE_ATTACK</code></td><td>使用武器触发一次近战攻击时触发</td><td>false</td></tr><tr><td>刺刀命中</td><td><code>ON_MELEE_HIT</code></td><td>使用武器近战攻击命中实体时触发</td><td>false</td></tr><tr><td>移动时</td><td><code>ON_MOVE</code></td><td>玩家移动时触发</td><td>true</td></tr><tr><td>冲刺时</td><td><code>ON_SPRINT</code></td><td>玩家疾跑冲刺时触发</td><td>true</td></tr><tr><td>停止移动时</td><td><code>ON_STOP_MOVE</code></td><td>玩家从移动中停止时触发</td><td>true</td></tr><tr><td>停止冲刺时</td><td><code>ON_STOP_SPRINT</code></td><td>玩家从疾跑中停止时触发</td><td>true</td></tr><tr><td>跳跃时</td><td><code>ON_JUMP</code></td><td>玩家跳跃时触发</td><td>false</td></tr><tr><td>站立时</td><td><code>ON_STAND</code></td><td>玩家站立时触发</td><td>true</td></tr><tr><td>蹲下时</td><td><code>ON_CROUCH</code></td><td>玩家蹲下时触发</td><td>true</td></tr><tr><td>趴下时</td><td><code>ON_CRAWL</code></td><td>玩家趴下时触发</td><td>true</td></tr><tr><td>射击时</td><td><code>ON_SHOOT</code></td><td>触发开火事件时触发</td><td>false</td></tr><tr><td>短点开火时</td><td><code>ON_BURST_SHOOT</code></td><td>短点射模式开火时触发</td><td>true</td></tr><tr><td>持续开火时</td><td><code>ON_AUTO_SHOOT</code></td><td>全自动开火时触发</td><td>true</td></tr><tr><td>瞄准时</td><td><code>ON_AIM</code></td><td>右键进入瞄准时触发</td><td>true</td></tr><tr><td>检视时</td><td><code>ON_INSPECTION</code></td><td>在检视武器时触发</td><td>false</td></tr><tr><td>切换快慢机</td><td><code>ON_SWITCH_FIREMODE</code></td><td>切换开火快慢机时触发</td><td>false</td></tr><tr><td>子弹生成时</td><td><code>ON_BULLET_GENERATE</code></td><td>子弹被生成时触发</td><td>false</td></tr><tr><td>子弹消失时</td><td><code>ON_BULLET_DISCARD</code></td><td>子弹<strong>在加载区块内</strong>消失时触发</td><td>false</td></tr><tr><td>更换配件时</td><td><code>ON_CHANGE_ATTACHMENT</code></td><td>改装界面更换任意配件时触发</td><td>false</td></tr><tr><td>切换主武器</td><td><code>ON_SWITCH_TO_GUN</code></td><td>由次级发射器切换至主武器时触发</td><td>true</td></tr><tr><td>切换下挂</td><td><code>ON_SWITCH_TO_UNDER_BARREL</code></td><td>由主武器切换至次级发射器时触发</td><td>true</td></tr><tr><td>切换弹种</td><td><code>ON_SWITCH_AMMO</code></td><td>进行切换弹种的行为时触发</td><td>false</td></tr><tr><td>切换瞄准倍率</td><td><code>ON_ZOOM_CHANGE</code></td><td>切换瞄准镜放大倍率时触发</td><td>false</td></tr><tr><td>锁定目标</td><td><code>ON_LOCKING_TARGET</code></td><td>制导武器锁定目标时触发</td><td>true</td></tr><tr><td>锁定完成时</td><td><code>ON_COMPLETE_LOCKING_TARGET</code></td><td>锁定目标并满足锁定时间后触发</td><td>false</td></tr><tr><td>爆炸命中</td><td><code>ON_BULLET_EXPLOSION_HIT</code></td><td>弹药爆炸命中实体时触发</td><td>false</td></tr><tr><td>爆炸击杀</td><td><code>ON_BULLET_EXPLOSION_KILL</code></td><td>弹药爆炸击杀实体时触发</td><td>false</td></tr><tr><td>信号触发</td><td><code>ON_SIGNAL</code></td><td>该武器收到全局信号事件时*<sup>[1]</sup></td><td>false</td></tr><tr><td>主动按键</td><td><code>ON_ACTION_</code><mark style="color:$primary;"><code>{Num}</code></mark></td><td>按下<mark style="color:$primary;"><code>{Num}</code></mark>号主动技能按键时触发<sup>[2]</sup></td><td>false</td></tr><tr><td>左键点击</td><td><code>ON_CLICK</code></td><td>持枪点击左键时触发</td><td>false</td></tr><tr><td>左键长按</td><td><code>ON_PRESS</code></td><td>持枪长按左键时触发</td><td>true</td></tr><tr><td>持续触发</td><td><code>ON_PLAYER_TICK</code></td><td>拿起武器后每一游戏刻都触发一次</td><td>false</td></tr></tbody></table>

&#x20;注：考虑到部分更为灵活的状态通讯与交互需求，Arcana 提供了两种适用情况更为广泛的触发器，即信号触发`ON_SIGNAL`和主动按键`ON_ACTION_{Num}` ，前者可通过其他插件与模组或命令方块产生一个自定义的触发信号，并可呼叫非手持的武器，便于武器状态的更新与灵活的信号传递。后者则提供了四个可供玩家主动触发的触发器，通过按下按键设置中ACTION 1 \~ 4所配置的按键，能直接激活对应的触发器`ON_ACTION_1` 到`ON_ACTION_4` ，可用于开发各类主动技能和特殊武器机制/动作。

{% hint style="info" %}
**开发须知** : 上述表格中带有\*标识的触发器在被使用时，无需手持拥有对应机制的武器，使用此种触发器可在副手持有/处于物品栏/处于玩家背包中等特殊情况下也能触发技能事件，但此时有许多动作类机制不可用
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hamsterbaron.gitbook.io/hamsterbaron/mechanic-guides/trigger/alltriggerlist.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
