• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Triggercasting Item Abilitys possible?

Status
Not open for further replies.
Level 2
Joined
Jun 15, 2013
Messages
10
hi
i try to use a spell where my dummie caster creates copies of different units with the staff of illusion item ability but somehow it doesnt work...
is it impossible in general or is there a trick? or did i fail something completely different?
notes: i use GUI and any other ability in the trigger works just fine

thanks in advance
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
hi
i try to use a spell where my dummie caster creates copies of different units with the staff of illusion item ability but somehow it doesnt work...
is it impossible in general or is there a trick? or did i fail something completely different?
notes: i use GUI and any other ability in the trigger works just fine

thanks in advance

You can't tell the unit to use a specific ability that an item has.
However, you can tell it to use the item.
You can try checking if your dummy has mana and if it is allowed to cast it.
Or you can give it the item and tell to use that.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
There is a special 'trick' to execute an item ability - especially that Item Illusions ability.

1. Create a new ability based off of Item Illusions ability.
2. Give the ability to your dummy.
3. Follow this script to execute the item order: call IssueTargetOrderById(udg_Dummy, 852274, udg_Caster)
4. Your trigger should look like this;
  • Item Illusions
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • Set Caster = (Triggering unit)
      • Set TempLoc = (Position of Caster)
      • Unit - Create 1 Dummy for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Set Dummy = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to Dummy
      • Custom script: call IssueTargetOrderById(udg_Dummy, 852274, udg_Caster)
Trigger above should create illusion of the caster when the caster casts the "YourAbility" Ability.

NOTE: The '852274' is the Order ID of that ability, this what makes the ability goes around.

I still don't understand this part;
i try to use a spell where my dummie caster creates copies of different units
Is this suppose to be, creating different unit-type ?

Here's a test map showing you how it's done.
 

Attachments

  • Item Illusions Test.w3x
    12.9 KB · Views: 71
Level 2
Joined
Jun 15, 2013
Messages
10
thank you^^

i meant that the illusion spell should be used multiple times on different units
well exacly i want to give my caster a passive ability that makes all his other spells create illusions of the targets but that wasnt the problem so i spared all the details in the question

my mistake was: i thought i could just assign a command string of choice to the abbility and order my dummie to run exacly that string (tried it with healingwave string for example)

works fine now^^
 
Status
Not open for further replies.
Top