User Tools

Site Tools


4rpl:commands:setunitammo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:setunitammo [2021/01/24 19:47] – added get/set tabs Sanian4rpl:commands:setunitammo [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 11: Line 11:
  
 ===== Description ===== ===== Description =====
-Sets the ammo of the unit. A value of 1 is how much a packet normally delivers.+Sets the ammo of the unit. A value of 1 is how much a packet normally delivers.\\
 The ammo can not exceed the max ammo, so set max ammo first. Amt values less than zero are changed to zero. The ammo can not exceed the max ammo, so set max ammo first. Amt values less than zero are changed to zero.
 +
 +:WARNING: If you are using this API in [[4rpl:commands:func_awake|:Awake]], if the unit's ammo ware is not energy it will be internally swapped to the correct ware after [[4rpl:commands:func_awake|:Awake]] processes. This will reset the unit's ammo back to 0 and have a visual glitch of the ammo dots appearing although the unit's ammo is 0. To avoid this, simply avoid using this API in [[4rpl:commands:func_awake|:Awake]].
  
 ===== Examples ===== ===== Examples =====
4rpl/commands/setunitammo.1611517657.txt.gz · Last modified: 2025/02/14 14:56 (external edit)