Herro, thanks for taking time to read. First of all, I've tried searching for a solution but couldn't find one, sorry if there is.
PROBLEM #1:
I'm trying to make a hero whose Weapon Type changes (missile to normal and vice versa) depending on the unit it "possesses." Possession is done via a dummy spell based on forked lightning.
I have tried making two different attacks and toggling them with this trigger:
Attack 1 which is ranged (missile) works appropriately (FigB):
So is there a way to fix this? Maybe I can use the original toggling system if there was a way to move the Attack 2 UI to assume to place of Attack 1?
PROBLEM #2:
Everytime the hero possesses a unit, he also changes Primary Attribute supposedly, but it doesn't work:
APPENDIX:
Here's my full trigger set as it is now to discriminate. Maybe I screwed up somewhere.
SkillPossess handles the possession of a target:
SkillPossess Death handles the reverting of the hero to ghost form:
Thanks for the time. Help is much appreciated.
PROBLEM #1:
I'm trying to make a hero whose Weapon Type changes (missile to normal and vice versa) depending on the unit it "possesses." Possession is done via a dummy spell based on forked lightning.
I have tried making two different attacks and toggling them with this trigger:
-
Unit - Set Unit: (Casting unit)'s Weapon Boolean Field: Attacks Enabled ('uaen')at Index:0 to Value: True

Attack 1 which is ranged (missile) works appropriately (FigB):

So is there a way to fix this? Maybe I can use the original toggling system if there was a way to move the Attack 2 UI to assume to place of Attack 1?
PROBLEM #2:
Everytime the hero possesses a unit, he also changes Primary Attribute supposedly, but it doesn't work:
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Footman
-
(Unit-type of (Target unit of ability being cast)) Equal to Grunt
-
-
-
-
Then - Actions
-
Hero - Modify Agility of (Casting unit): Add 1.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 1
-
-
Else - Actions
-
Do nothing
-
-
APPENDIX:
Here's my full trigger set as it is now to discriminate. Maybe I screwed up somewhere.
SkillPossess handles the possession of a target:
-
SkillPossess
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to SPECIAL: Dominate (Neutral Hostile)
-
-
Actions
-
Wait 0.04 seconds
-
Set VariableSet SkillPossess = True
-
Unit - Remove ATTACHMENT: Glow (chest) from (Casting unit)
-
Unit - Remove ATTACHMENT: Glow (origin) from (Casting unit)
-
Unit - For (Casting unit), Ability SPECIAL: Dominate (Neutral Hostile), Hide ability: True
-
Unit - For (Casting unit), Ability SPECIAL: Extricate, Hide ability: False
-
Unit - For Unit (Casting unit), start cooldown of ability SPECIAL: Extricate " over "30.00 seconds.
-
Unit - Set Unit Skin of (Casting unit) to (Integer((String((Skin ID of (Target unit of ability being cast))))))
-
Unit - Add ATTACHMENT: Glow (chest) to (Casting unit)
-
Unit - Add ATTACHMENT: Glow (origin) to (Casting unit)
-
Unit - Change color of (Casting unit) to (Color of (Owner of (Casting unit)))
-
Unit - Set Unit: (Casting unit)'s Weapon Boolean Field: Attacks Enabled ('uaen')at Index:0 to Value: True
-
Unit - Set Unit: (Casting unit)'s Weapon Boolean Field: Attacks Enabled ('uaen')at Index:0 to Value: True
-
Unit - Set Unit: (Casting unit)'s Weapon Integer Field: Attack Attack Type ('ua1t')at Index:0 to Value: (Unit: (Target unit of ability being cast)'s Weapon Integer Field: Attack Attack Type ('ua1t') at Index:0)
-
Unit - Set Unit: (Casting unit)'s Weapon Real Field: Attack Projectile Speed ('ua1z')at Index:0 to Value: (Unit: (Target unit of ability being cast)'s Weapon Real Field: Attack Projectile Speed ('ua1z') at Index:0)
-
Unit - Set Unit: (Casting unit)'s Weapon Real Field: Attack Range ('ua1m')at Index:0 to Value: (Unit: (Target unit of ability being cast)'s Weapon Real Field: Attack Range ('ua1m') at Index:0)
-
Unit - Set Unit: (Casting unit)'s Weapon String Field: Attack Projectile Art ('ua1m')at Index:0 to Value: (Unit: (Target unit of ability being cast)'s Weapon String Field: Attack Projectile Art ('ua1m') at Index:0)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Target unit of ability being cast) is A melee attacker) Equal to True
-
-
Then - Actions
-
Unit - Set Unit: (Casting unit)'s Weapon Integer Field: Attack Weapon Sound ('ucs1')at Index:0 to Value: (Unit: (Target unit of ability being cast)'s Weapon Integer Field: Attack Weapon Sound ('ucs1') at Index:0)
-
Unit - Set Unit: (Casting unit)'s Weapon Integer Field: Attack Damage Number Of Dice ('ua1d')at Index:0 to Value: 6
-
-
Else - Actions
-
Unit - Set Unit: (Casting unit)'s Weapon Integer Field: Attack Damage Number Of Dice ('ua1d')at Index:0 to Value: 4
-
-
-
Custom script: call RemoveLocation(udg_LeakPoint2)
-
-------- TIER 1 --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Footman
-
(Unit-type of (Target unit of ability being cast)) Equal to Grunt
-
-
-
-
Then - Actions
-
Hero - Modify Agility of (Casting unit): Add 1.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 1
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Fletcher
-
(Unit-type of (Target unit of ability being cast)) Equal to Hunter
-
-
-
-
Then - Actions
-
Hero - Modify Intelligence of (Casting unit): Add 1.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 2
-
-
Else - Actions
-
Do nothing
-
-
-
-------- TIER 2 --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Skirmisher
-
(Unit-type of (Target unit of ability being cast)) Equal to Returned Champion
-
-
-
-
Then - Actions
-
Hero - Modify Agility of (Casting unit): Add 2.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 1
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Rogue
-
(Unit-type of (Target unit of ability being cast)) Equal to Stalker
-
-
-
-
Then - Actions
-
Hero - Modify Intelligence of (Casting unit): Add 2.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 2
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Knight
-
(Unit-type of (Target unit of ability being cast)) Equal to Raider
-
-
-
-
Then - Actions
-
Hero - Modify Strength of (Casting unit): Add 2.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 0
-
-
Else - Actions
-
Do nothing
-
-
-
-------- TIER 3 --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to De la Torrean Chevalier
-
(Unit-type of (Target unit of ability being cast)) Equal to Churl
-
-
-
-
Then - Actions
-
Hero - Modify Agility of (Casting unit): Add 4.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 1
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Fusilier
-
(Unit-type of (Target unit of ability being cast)) Equal to Predator
-
-
-
-
Then - Actions
-
Hero - Modify Intelligence of (Casting unit): Add 4.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 2
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Dragoon
-
(Unit-type of (Target unit of ability being cast)) Equal to Marauder
-
-
-
-
Then - Actions
-
Hero - Modify Strength of (Casting unit): Add 4.
-
Unit - Set Unit: (Casting unit)'s Integer Field: Primary Attribute ('upra') to Value: 0
-
-
Else - Actions
-
Do nothing
-
-
-
Set VariableSet LeakPoint2 = (Position of (Target unit of ability being cast))
-
Unit - Remove (Target unit of ability being cast) from the game
-
Unit - Move (Casting unit) instantly to LeakPoint2, facing (Facing of (Target unit of ability being cast)) degrees
-
-
SkillPossess Death handles the reverting of the hero to ghost form:
-
SkillPossess Death
-
Events
-
Unit - A unit Finishes casting an ability
-
Unit - A unit Dies
-
-
Conditions
-
(((Unit-type of (Dying unit)) Equal to Phasmadaemon) and (SkillPossess Equal to True)) or ((Ability being cast) Equal to SPECIAL: Extricate)
-
-
Actions
-
Set VariableSet LeakPoint2 = (Position of HeroKhalileo)
-
Special Effect - Create a special effect at LeakPoint2 using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_LeakPoint2)
-
Set VariableSet SkillPossess = False
-
Unit - Remove ATTACHMENT: Glow (chest) from HeroKhalileo
-
Unit - Remove ATTACHMENT: Glow (origin) from HeroKhalileo
-
Unit - For HeroKhalileo, Ability SPECIAL: Dominate (Neutral Hostile), Hide ability: False
-
Unit - For HeroKhalileo, Ability SPECIAL: Extricate, Hide ability: True
-
Unit - For Unit (Casting unit), start cooldown of ability SPECIAL: Dominate (Neutral Hostile) " over "5.00 seconds.
-
Unit - Set Unit Skin of HeroKhalileo to (Integer("U00E"))
-
Unit - Change color of HeroKhalileo to (Color of (Owner of HeroKhalileo))
-
Unit - Set Unit: HeroKhalileo's Weapon Boolean Field: Attacks Enabled ('uaen')at Index:0 to Value: False
-
Unit - Set Unit: HeroKhalileo's Weapon Integer Field: Attack Weapon Sound ('ucs1')at Index:0 to Value: 0
-
Unit - Set Unit: HeroKhalileo's Integer Field: Primary Attribute ('upra') to Value: 1
-
-
Thanks for the time. Help is much appreciated.