Can someone optimize this weapon pickup script?
(make it so it isn't one right handed weapon per player, but rather per unit?)
(When a unit picks up a right handed weapon, HasWeaponRight = True)
(make it so it isn't one right handed weapon per player, but rather per unit?)
(When a unit picks up a right handed weapon, HasWeaponRight = True)
-
Has Right Weapon
-

Events
-


Unit - A unit Acquires an item
-
-

Conditions
-


Or - Any (Conditions) are true
-



Conditions
-




(Item-type of (Item being manipulated)) Equal to Katana
-




(Item-type of (Item being manipulated)) Equal to Training Sword
-
-
-
-

Actions
-


Wait 0.10 seconds
-


Set HasWeaponRight[(Player number of (Triggering player))] = True
-
-
-
Doesnt have Right Weapon
-

Events
-


Unit - A unit Loses an item
-
-

Conditions
-


Or - Any (Conditions) are true
-



Conditions
-




(Item-type of (Item being manipulated)) Equal to Katana
-




(Item-type of (Item being manipulated)) Equal to Training Sword
-
-
-
-

Actions
-


Wait 0.10 seconds
-


Set HasWeaponRight[(Player number of (Triggering player))] = False
-
-
-
Prevent Pickup Right
-

Events
-


Unit - A unit Acquires an item
-
-

Conditions
-


HasWeaponRight[(Player number of (Triggering player))] Equal to True
-
-

Actions
-


Hero - Drop (Item being manipulated) from (Triggering unit)
-


Game - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) the text: You already have a ...
-
-


