- Joined
- Feb 4, 2008
- Messages
- 3,513
I played around trying to make a equipment system, using the new natives instead of custom units to change attack and armor of the unit. But it does not seem to work.
This is the trigger I tested with. Tested it on a rifleman. Nothing happened. Tried with different attack index. Hide and Unhide is only used because I remember some issues in the far past, where that method would work. It does not.
This is the trigger I tested with. Tested it on a rifleman. Nothing happened. Tried with different attack index. Hide and Unhide is only used because I remember some issues in the far past, where that method would work. It does not.
-
TestEquip
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Equip Handgun
-
-

Actions
-


Custom script: call DisplayTextToPlayer(Player(0), 0, 0, "Equip Handgun registered")
-


Unit - Set Unit: (Triggering unit)'s Weapon Integer Field: Attack Attack Type ('ua1t')at Index:0 to Value: 1
-


Unit - Set Unit: (Triggering unit)'s Weapon Integer Field: Attack Damage Base ('ua1b')at Index:0 to Value: 3
-


Unit - Set Unit: (Triggering unit)'s Weapon Integer Field: Attack Damage Sides Per Die ('ua1s')at Index:0 to Value: 17
-


Unit - Set Unit: (Triggering unit)'s Weapon Integer Field: Attack Damage Number Of Dice ('ua1d')at Index:0 to Value: 1
-


Unit - Set Unit: (Triggering unit)'s Weapon Real Field: Attack Range ('ua1m')at Index:0 to Value: 500.00
-


Unit - Set Unit: (Triggering unit)'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 0.33
-


Unit - Hide (Triggering unit)
-


Unit - Unhide (Triggering unit)
-
-


