Spell Steal Ability

Raizn

New Member
Reaction score
2
Ok Helpers i need some suggestions for my Spell Steal Ability.

which is this:

Trigger:
  • Set Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set Ability[(Player number of (Owner of (Triggering unit)))] = (Ability being cast)


and

Trigger:
  • Get Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spell Steal
    • Actions
      • Unit - Add Ability[(Player number of (Owner of (Target unit of ability being cast)))] to (Triggering unit)
      • Unit - Set level of Ability[(Player number of (Owner of (Target unit of ability being cast)))] for (Triggering unit) to (Level of Ability[(Player number of (Owner of (Target unit of ability being cast)))] for (Triggering unit))


ok so far. everything is working as intended. BUT. what would happen if i steal 6 different hero abilities without removing an old and existing one ? would a spell be automatically replaced with the new one ?

and

i thought about two possibilities to extend this spell

#1: remove the old stolen spell with the new stolen spell. But i have at the moment no idea how to store the last stolen spell and remove it after stealing a new one. maybe im just stupid today^^

#2 let the ability steal 3 or 4 spells and do an integer loop to remove random one of the stolen spells and add the next stolen spell to the rest of the stolen spells.

please give me some feedback about that.

bye Raizn
 

kaboo

New Member
Reaction score
45
to remove the oldest spell i would use this
Code:
Get Spell
Events - Unit - A unit Starts the effect of an ability
Conditions - (Ability being cast) Equal to Spell Steal 
Actions
-Unit - Add Ability[(Player number of (Owner of (Target unit of ability being cast)))] to (Triggering unit)
-Unit - Set level of Ability[(Player number of (Owner of (Target unit of ability being cast)))] for (Triggering unit) to (Level of Ability[(Player number of (Owner of (Target unit of ability being cast)))] for (Triggering unit))
-Set Integer = Integer+1
-If Integer=5 then 
  -remove spell[1] from casting unit
  -for each integer 1 to 3 do actions
     -set spell[A]=spell[A+1]
  -set Integer = 4
-Set spell[Integer]=Ability[(Player number of (Owner of (Target unit of ability being cast)))]
integer is integer variable
spell[x] is ability variable with array 4
you have to set Integer to 0 at map initialization
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top