Difference between revisions of "04B8"
Jump to navigation
Jump to search
m |
m |
||
Line 9: | Line 9: | ||
| p2d = Slot + 1 | | p2d = Slot + 1 | ||
| p3t = [''var1''] | | p3t = [''var1''] | ||
− | | p3d = Variable to store the weapon | + | | p3d = Variable to store the weapon type |
| p4t = [''var2''] | | p4t = [''var2''] | ||
| p4d = Variable to store the weapon ammo count | | p4d = Variable to store the weapon ammo count | ||
Line 16: | Line 16: | ||
}} | }} | ||
− | This opcode gets the weapon | + | This opcode gets the weapon type, ammo, and model in the weapon slot of the character. The model index is derived from the model id column in the [[weapon.dat]] file. If there is no weapon for that slot, the weapon type returns ''0'' and the model returns ''-1''. |
== Keywords == | == Keywords == | ||
− | store, get, actor, character, weapon, | + | store, get, actor, character, weapon, type, model, slot |
Latest revision as of 18:14, 8 July 2017
- Description
- Gets the character's weapon data in the weapon slot
- Syntax
- 04B8: get_weapon_data_from_actor [char handle] slot [int] weapon [var1] ammo [var2] model [var3]
- Parameter
- [char handle]
- The handle of the character
- [int]
- Slot + 1
- [var1]
- Variable to store the weapon type
- [var2]
- Variable to store the weapon ammo count
- [var3]
- Variable to store the weapon model index
This opcode gets the weapon type, ammo, and model in the weapon slot of the character. The model index is derived from the model id column in the weapon.dat file. If there is no weapon for that slot, the weapon type returns 0 and the model returns -1.
Keywords
store, get, actor, character, weapon, type, model, slot