Hello, trying to create an ability that allows buffs casted on spirit linked units to duplicate the spell for other linked units, i know the following isn't perfect, i still have assign custom values to track which are linked and a couple other things, I just never use IssueTargetOrderByID and was testing the concept. I digress, everything seems to be working, the units and spells are all saved I believe the issue lies in the Jass order. Any insight is appreciated.
Also a method of tracking which units are linked with each cast other then custom unit values would be neat, as it will interfere with other spells in the campaign.
Also a method of tracking which units are linked with each cast other then custom unit values would be neat, as it will interfere with other spells in the campaign.
-
Spirit Link
-
Events
-
Unit - A unit owned by Player 1 (Red) Starts the effect of an ability
-
-
Conditions
-
((Target unit of ability being cast) belongs to an enemy of Player 1 (Red).) Equal to False
-
-
Actions
-
Set VariableSet Ability = (Ability being cast)
-
Game - Display to (All players) the text: (Tooltip of Ability for level 1)
-
Set VariableSet SpellLevel[71] = (Level of Ability for (Casting unit))
-
Game - Display to (All players) the text: (String(SpellLevel[71]))
-
Set VariableSet SpellPoint[71] = (Position of (Target unit of ability being cast))
-
Unit - Create 1 Dummy Caster for Player 1 (Red) at SpellPoint[71] facing Default building facing degrees
-
Set VariableSet SpellDummy[71] = (Last created unit)
-
Unit - Add Ability to (Last created unit)
-
Set VariableSet SpellCastTrack[71] = (Mana cost of Ability, Level 1.)
-
Set VariableSet SpellReal[71] = (Ability: (Unit: (Last created unit)'s Ability with Ability Code: Ability)'s Real Level Field Cooldown ('acdn'), of Level: 1)
-
Unit - Set level of Ability for (Last created unit) to SpellLevel[71]
-
Unit - For Unit SpellDummy[71], Set mana cost of ability Ability, Level: 1 to 0
-
Ability - Set Ability: (Unit: SpellDummy[71]'s Ability with Ability Code: Ability)'s Real Level Field: Cooldown ('acdn') of Level: 1 to 0.00
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 1000.00 of SpellPoint[71].) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Spirit Link) Equal to True
-
-
Then - Actions
-
Game - Display to (All players) the text: duplicating
-
Set VariableSet SpellTarget[71] = (Picked unit)
-
Game - Display to (All players) the text: (Parse ((String((Unit-type of SpellDummy[71]))) + ((Tooltip of Ability for level 1) + (String((Unit-type of SpellTarget[71]))))))
-
Custom script: call IssueTargetOrderById(udg_SpellDummy[71], udg_Ability, udg_SpellTarget[71])
-
-
Else - Actions
-
-
-
-
Game - Display to (All players) the text: after units
-
Unit - For Unit SpellDummy[71], Set mana cost of ability Ability, Level: 1 to SpellCastTrack[71]
-
Ability - Set Ability: (Unit: SpellDummy[71]'s Ability with Ability Code: Ability)'s Real Level Field: Cooldown ('acdn') of Level: 1 to SpellReal[71]
-
Unit - Add a 0.50 second Generic expiration timer to SpellDummy[71]
-
Custom script: call RemoveLocation(udg_SpellPoint[71])
-
-