This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 4rpl:commands:setunitammoware [2023/12/08 00:03] – Grabz | 4rpl:commands:setunitammoware [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 40: | Line 40: | ||
| <code 4rpl> | <code 4rpl> | ||
| :GameLoaded | :GameLoaded | ||
| - | once | + | |
| - | | + | :Once |
| - | endonce | + | @init |
| + | :init | ||
| + | | ||
| + | | ||
| + | | ||
| </ | </ | ||
| + | |||
| + | ===== More Programming Notes ===== | ||
| + | |||
| + | In game version 2.5.1 and earlier, **__do not use SetUnitAmmoWare on a unit that does not have an ammo bar__**, this includes units that are under construction, | ||
| + | |||
| + | Attempting to run SetUnitAmmoWare on one of these units causes one of the following to occur: | ||
| + | * The script stops running and does not send any error messages. | ||
| + | * The script pulls additional items from the stack. | ||
| + | Details of what settings cause one error or the other is not yet understood. | ||
| + | |||
| + | For units in a CPACK, the relevant setting is Settings > Interface > Show unit ammo bar; if you want to modify the ammo type of that unit with 4rpl, ensure this setting is enabled. | ||
| < | < | ||