Pets spell

Darkonight

New Member
Reaction score
2
Rly Simple... A want to make a Trigger that does so you can only have one summoned unit of the same kind. Like if I summon a "Water Element" and then i summon another water element, but when i do the the first water element is Removed/killed.
 

TheOverWhelm

Member
Reaction score
16
Just use the same ability that Rexxar has for his Quilbeast?
If not, do a check for cast a spell, see if there's a summoned unit (or make it check which spell it is), make a group of all of that type and pick every unit in that group, have an If/Then to see if the summoned unit is it, if it isn't then kill it.
This wont work for multiple units summon (this means like 2 Water Elements, or 2 skeletons. 2 skeletons summoned just makes the game thing the spell was run twice, unless I did testing wrong...)
 

Darkonight

New Member
Reaction score
2
Could you show me this In Trigger form xD Also, i Have like a diffrent Summoned unit for every skill point :O
 

TheOverWhelm

Member
Reaction score
16
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • Multiple ConditionsOr - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to (==) Animate Dead
    • Actions
      • Set TempGroup = (Units in EntireMap matching ((((Matching unit) is Summoned) Equal to (==) True) and (((Unit-type of (Matching unit)) Equal to (==) Footman) and ((Owner of (Matching unit)) Equal to (==) Player 1 (Red)))))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to (!=) (Summoned unit)
            • Then - Actions
            • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)

Something like that
 

tommerbob

Minecraft. :D
Reaction score
110
Just do this:

Trigger:
  • Events
    • Unit - A unit spawns a summoned unit
    • Conditions
      • (Unit-type of Summoned unit) equal to [your unit]
    • Actions
      • Unit - Remove Pet[player number of (owner of (Triggering unit))]
      • Set Pet[player number of (owner of (Triggering unit))] = Summoned Unit


The disadvantage to this is that it only allows for 1 summoned unit per player.
 
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