• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Swap spell randomly doesn't work

Status
Not open for further replies.
Level 27
Joined
Oct 18, 2008
Messages
955
  • ToG Enter
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Entering unit) is an illusion) Equal to True
      • (Unit-type of (Entering unit)) Equal to Guy
    • Actions
      • Set ToG[(Player number of (Owner of (Entering unit)))] = (Entering unit)
  • ToG Swap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to TheOtherGuy
      • (ToG[(Player number of (Owner of (Casting unit)))] is alive) Equal to True
    • Actions
      • Set TempPoint = (Position of (Casting unit))
      • Set TempUnit2 = ToG[(Player number of (Owner of (Casting unit)))]
      • Set TempPoint2 = (Position of TempUnit2)
      • Unit - Turn collision for TempUnit2 Off
      • Unit - Turn collision for (Casting unit) Off
      • Unit - Move TempUnit2 instantly to TempPoint
      • Unit - Move (Casting unit) instantly to TempPoint2
      • Unit - Turn collision for (Casting unit) On
      • Unit - Turn collision for TempUnit2 On
Illusion is created by mirror image. Switch is based on wind walk.

in all simpleness, the spell is supposed to switch the unit with his illusion. it sometimes works as intended but most of the time does nothing as the spell is cast.

its not MUI. it used to be before i remade it in hopes of fixing it but it still doesn't work most of the time.
 
you can use triggering unit instead of entering unit but I guess it woudn't change anything

I'm guessing the ability is instant? You could make it target the illusion and have the condition: Target unit of ability being cast equal to ToG(Number of Owner of (casting/triggering unit)
 
Hmm. As I see it, the spell is instant but the unit creation can be slighty delayed. If so, it would lead to the unit you're looking for to be moved is non-existent.

Another thing that comes to my mind is that "TheOtherGuy" might be equal to "null". If so the trigger will never fire.

++ Since the creation might be delayed the trigger will not fire because the illusion has to enter the map to make the trigger "ToG Swap" fire.


If you'd give me some mins I could try and fix something up. Might be a bit hard for me to do, have to install Wc3 again then, but I could try and write a vJass or Jass or maybe GUI code real fast in the text.


~Dynasti
 
First of all, there is no delay.

Second of all, even if there was delay, it would only cause a problem if he were trying to cast the spell immediately once the illusion is created, which doesn't make any sense since a spell can be cast at any given time during the game.
 
Status
Not open for further replies.
Back
Top