Creating Illusions by Triggers

Status
Not open for further replies.
Level 25
Joined
May 11, 2007
Messages
4,650
Then how do you order the dummy unit to use an item ability? (they have no orderstring whatsoever)

True, also I don't play dota much, but what happens if:
http://web.dota-allstars.com/heroes/2866
Has magic immunity on himself?

ALSO!! Very important, his spell "Spirit Lance" creates an illusion NEXT to the enemy target, how is that made? Do they move the illusion next to it after it has been summoned or are they actually made by triggers/another spell?
 
Level 9
Joined
Dec 12, 2007
Messages
489
you can edit it to be a unit ability and it will have an orderstring...

.....

then just move the created illusion into the position of target unit... you must use a unit enters region event for this I think.

nah... it still won't have any orderstring, you have to use orderid...
there is no need to use that event, you could just add another trigger with event:
A unit spawns a summoned unit or what (a bit forget)
and check if the unit is illusion, the unittype, and if its the dummy that spawn it.
after that move the summoned unit to targeted unit position.

This whole thing need JNGP for MUI etc..
 
Level 25
Joined
May 11, 2007
Messages
4,650
nah... it still won't have any orderstring, you have to use orderid...
there is no need to use that event, you could just add another trigger with event:
A unit spawns a summoned unit or what (a bit forget)
and check if the unit is illusion, the unittype, and if its the dummy that spawn it.
after that move the summoned unit to targeted unit position.

This whole thing need JNGP for MUI etc..

There's no need for it to be multicast, just keep it to GUI and I'm happy :)
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
The Order Id of the Item Illusions ability should be 852274.
Edit1:
  • IllusionCheck
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • ((Summoned unit) is an illusion) Equal to True
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering unit))
This trigger will check and correctly display the name of a summoned Illusion. Will work for the Item Illusions ability and Mirror Image.
Edit2: Apparently Summoned unit can be replaced by Triggering unit.
With this trigger, I guess you could have fun with the actions that happen when an illusion is spawned.
Edit3: An example way to create and manipulate illusions with a spell. In this example, we will pretend that the YourAbility is a targeting spell.

This trigger will create the illusion.
  • HaveAnIllusion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • Set IllusionCaster = (Triggering unit)
      • Set IllusionTarget = (Target unit of ability being cast)
      • Set TempLoc = (Position of IllusionCaster)
      • Unit - Create 1 Spell Dummy for (Owner of IllusionCaster) at TempLoc facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Item Illusions to (Last created unit)
      • Custom script: call IssueTargetOrderById(GetLastCreatedUnit(),852274,IllusionCaster)
      • Custom script: call RemoveLocation(udg_TempLoc)
This trigger will do things with the illusion. In this example, it will move the illusion near the Spell Target's location.
  • IllusionMove
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • ((Triggering unit) is an illusion) Equal to True
    • Actions
      • Set TempLoc = (Position of IllusionTarget)
      • Unit - Move (Triggering unit) instantly to TempLoc
      • Custom script: call RemoveLocation(udg_TempLoc)
Note that this method may not be MUI since it depends on how fast the game will detect
  • Unit - A unit Spawns a summoned unit
 
Last edited:
Level 9
Joined
Dec 12, 2007
Messages
489
  • IllusionCheck
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • ((Summoned unit) is an illusion) Equal to True
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering unit))
This trigger will check and correctly display the name of a summoned Illusion. Will work for the Item Illusions ability and Mirror Image.
nah... I think that using Triggering Unit would had the trouble defining who summon, and who is summoned. it would be better to use Summoned Unit...

there are few trouble with the trigger watermelon suggested. for example what will happen when there are other ability that creates illusion? (just imagine it)

so about this case, I would suggest that if you want to "completely" copy the spell, you should learn JASS/VJASS as this thing, IMO, is very difficult to achieve in GUI...
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
nah... I think that using Triggering Unit would had the trouble defining who summon, and who is summoned. it would be better to use Summoned Unit...

there are few trouble with the trigger watermelon suggested. for example what will happen when there are other ability that creates illusion? (just imagine it).
Could you please provide me an example when Triggering unit would fail to refer to the Summoned unit with this trigger?

That could be a problem, which you could fix with something like this:
  • Set IllusionRealCaster = (Last created unit)
to refer to the dummy unit.
In the trigger where you actually do something with the illusion, use this condition instead:
  • And - All (Conditions) are true
    • Conditions
      • ((Summoned unit) is an illusion) Equal to True
      • (Summoning unit) Equal to IllusionRealCaster
 
Status
Not open for further replies.
Top