dzxmsf
Refugee
- Version
- V2.X
- Platform
- Windows
Since the stun baton's charge mechanism was modified in the A21 version, there has been an issue that remains unfixed to this day. Before explaining it, we need to first understand its charge mechanism.
Initialize charge progress
<triggered_effect trigger="onSelfEquipStart" action="SetItemMetaFloat" change="0" relative="true" key="charge"/>
Normal attacks increase charge progress by 1 point
<triggered_effect trigger="onSelfPrimaryActionRayHit" action="SetItemMetaFloat" change="1" relative="true" key="charge">
<requirement name="IsAlive" target="other"/>
<requirement name="!EntityTagCompare" target="other" tags="trader"/>
</triggered_effect>
Powerful attacks increase charge progress by 1 point (Trigger Condition: Existing charge progress is greater than or equal to 3)
<triggered_effect trigger="onSelfSecondaryActionRayHit" action="SetItemMetaFloat" change="1" relative="true" key="charge">
<requirement name="IsAlive" target="other"/>
<requirement name="!EntityTagCompare" target="other" tags="trader"/>
<requirement name="CompareItemMetaFloat" operation="GTE" value="3" key="charge"/>
</triggered_effect>
Powerful attacks increase charge progress by 2 points (Trigger Condition: Existing charge progress is less than or equal to 2)
<triggered_effect trigger="onSelfSecondaryActionRayHit" action="SetItemMetaFloat" change="2" relative="true" key="charge">
<requirement name="IsAlive" target="other"/>
<requirement name="!EntityTagCompare" target="other" tags="trader"/>
<requirement name="CompareItemMetaFloat" operation="LTE" value="2" key="charge"/>
</triggered_effect>
The problem I found is that when the charging progress increases by 2 or more units, the sound effects cannot be played in the correct order.
This is because it can only play sequentially one unit at a time.
This characteristic causes the sound effect of the sixth skill book to be incorrect at all times.
For example, when my charge progress is at 2, if I perform a power attack at this moment, it will increase the charge progress to 4. The charging is completed at this point, but it actually plays the sound effect corresponding to charge level 3.
Initialize charge progress
<triggered_effect trigger="onSelfEquipStart" action="SetItemMetaFloat" change="0" relative="true" key="charge"/>
Normal attacks increase charge progress by 1 point
<triggered_effect trigger="onSelfPrimaryActionRayHit" action="SetItemMetaFloat" change="1" relative="true" key="charge">
<requirement name="IsAlive" target="other"/>
<requirement name="!EntityTagCompare" target="other" tags="trader"/>
</triggered_effect>
Powerful attacks increase charge progress by 1 point (Trigger Condition: Existing charge progress is greater than or equal to 3)
<triggered_effect trigger="onSelfSecondaryActionRayHit" action="SetItemMetaFloat" change="1" relative="true" key="charge">
<requirement name="IsAlive" target="other"/>
<requirement name="!EntityTagCompare" target="other" tags="trader"/>
<requirement name="CompareItemMetaFloat" operation="GTE" value="3" key="charge"/>
</triggered_effect>
Powerful attacks increase charge progress by 2 points (Trigger Condition: Existing charge progress is less than or equal to 2)
<triggered_effect trigger="onSelfSecondaryActionRayHit" action="SetItemMetaFloat" change="2" relative="true" key="charge">
<requirement name="IsAlive" target="other"/>
<requirement name="!EntityTagCompare" target="other" tags="trader"/>
<requirement name="CompareItemMetaFloat" operation="LTE" value="2" key="charge"/>
</triggered_effect>
The problem I found is that when the charging progress increases by 2 or more units, the sound effects cannot be played in the correct order.
This is because it can only play sequentially one unit at a time.
This characteristic causes the sound effect of the sixth skill book to be incorrect at all times.
For example, when my charge progress is at 2, if I perform a power attack at this moment, it will increase the charge progress to 4. The charging is completed at this point, but it actually plays the sound effect corresponding to charge level 3.
- Reproduction Steps
- The 5 hit sound effects of the stun gun can only be played following the rule of increasing by 1 unit each time; if the increase is by 2 or more units at once, it will only play according to the progress of a 1-unit increase.