• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger Malfunction

Status
Not open for further replies.
Level 7
Joined
Mar 16, 2008
Messages
348
  • Tag Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tag Him!!!
    • Actions
      • Set TempLocation = (Position of TagPlayersArray[(Player number of (Owner of (Triggering unit)))])
      • Unit - Remove (Casting unit) from the game
      • Unit - Create 1 Tag Player for (Player((Player number of (Owner of (Triggering unit))))) at TempLocation facing Default building facing degrees
      • Camera - Pan camera for (Player((Player number of (Owner of (Triggering unit))))) to (Position of (Last created unit)) over 0.00 seconds
      • Selection - Select (Last created unit) for (Player((Player number of (Owner of (Triggering unit)))))
      • Set TagPlayersArray[(Player number of (Player((Player number of (Owner of (Triggering unit))))))] = (Last created unit)
      • Set TempLocation = (Position of TagPlayersArray[(Player number of (Owner of (Target unit of ability being cast)))])
      • Unit - Remove (Target unit of ability being cast) from the game
      • Unit - Create 1 Your It! for (Player((Player number of (Owner of (Target unit of ability being cast))))) at TempLocation facing Default building facing degrees
      • Selection - Select (Last created unit) for (Player((Player number of (Owner of (Target unit of ability being cast)))))
      • Camera - Pan camera for (Player((Player number of (Owner of (Target unit of ability being cast))))) to (Position of (Last created unit)) over 0.00 seconds
      • Set TagPlayersArray[(Player number of (Player((Player number of (Owner of (Target unit of ability being cast))))))] = (Last created unit)
      • Set YourItPlayerInt = (Player number of (Player((Player number of (Owner of (Target unit of ability being cast))))))
I was bored so i started making a tag map, and this trigger was supposed to replace the unit which tagged the other with a normal unit and replace the tagged unit with a tagger, but instead it just keeps the tagged unit normal, replaces the tagging unit with a normal unit, and creates another tagging unit for the owner of tagging player
If its too complex pm me and ill send ya the map, sorry if i have some bad English but i'm not English
Thx in advance!
P.S.: if there's a simpler way of doing this(without jass, im still learning it), then tell me i like to learn
 
Level 7
Joined
Mar 16, 2008
Messages
348
Now it makes both units equal, this is my trigger
  • Tag Ability
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Tag Him!!!
    • Actions
      • Unit - Replace (Triggering unit) with a Tag Player using The new unit's default life and mana
      • Camera - Pan camera for (Player((Player number of (Owner of (Triggering unit))))) to (Position of (Last created unit)) over 0.00 seconds
      • Selection - Select (Last created unit) for (Player((Player number of (Owner of (Triggering unit)))))
      • Set TagPlayersArray[(Player number of (Player((Player number of (Owner of (Triggering unit))))))] = (Last created unit)
      • Unit - Replace (Target unit of ability being cast) with a Your It! using The new unit's default life and mana
      • Selection - Select (Last created unit) for (Player((Player number of (Owner of (Target unit of ability being cast)))))
      • Camera - Pan camera for (Player((Player number of (Owner of (Target unit of ability being cast))))) to (Position of (Last created unit)) over 0.00 seconds
      • Set TagPlayersArray[(Player number of (Player((Player number of (Owner of (Target unit of ability being cast))))))] = (Last created unit)
      • Set YourItPlayerInt = (Player number of (Player((Player number of (Owner of (Target unit of ability being cast))))))
maybe its a prob with the ability, i'm gonna check it, if i get it to work ill rep you for reducing my code =P
Edit: forgot to mention they all turn to Tag Player, but the targeted unit doesn't really change because it was a tag player before!
 
Level 7
Joined
Mar 16, 2008
Messages
348
Yep i fixed both those bugs(before you answered my post lol) and it still doesn't work, its like this now
  • Tag Ability
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Tag Him!!!
    • Actions
      • Unit - Replace (Triggering unit) with a Tag Player using The new unit's default life and mana
      • Camera - Pan camera for (Player((Player number of (Owner of (Triggering unit))))) to (Position of (Last replaced unit)) over 0.00 seconds
      • Selection - Select (Last replaced unit) for (Player((Player number of (Owner of (Triggering unit)))))
      • Set TagPlayersArray[(Player number of (Player((Player number of (Owner of (Triggering unit))))))] = (Last replaced unit)
      • Unit - Replace (Target unit of ability being cast) with a Your It! using The new unit's default life and mana
      • Selection - Select (Last replaced unit) for (Player((Player number of (Owner of (Target unit of ability being cast)))))
      • Camera - Pan camera for (Player((Player number of (Owner of (Target unit of ability being cast))))) to (Position of (Last replaced unit)) over 0.00 seconds
      • Set TagPlayersArray[(Player number of (Player((Player number of (Owner of (Target unit of ability being cast))))))] = (Last replaced unit)
      • Set YourItPlayerInt = (Player number of (Player((Player number of (Owner of (Target unit of ability being cast))))))
I'm really thank full to you for trying to help me! but i can't seem to find the solution!
 
Level 7
Joined
Mar 16, 2008
Messages
348
I found the problem!!! the problem was i was replacing the casting unit before the other, and that made the Target Unit of ability being cast inefective, as there was no longer an ability being cast!!! i solved it thx for trying to help!
 
Last edited:
Status
Not open for further replies.
Top