• 🏆 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] Problem with dummy

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2015
Messages
53
I want my dummy(normal unit, not hero) to cast heal and flamestrike but hes not listening to orders.
heal
  • heal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unknown Contents (heal)
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
      • Unit - Add Heal to (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Human Priest - Heal (Target unit of ability being cast)
      • Custom script: call RemoveLocation(udg_Temp_Point)
flamestrike
  • heal Copy Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unknown Contents (fire)
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
      • Unit - Add Flame Strike to (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Triggering unit) to Human Blood Mage - Flame Strike (Position of (Target unit of ability being cast))
      • Custom script: call RemoveLocation(udg_Temp_Point)
For example trigger like this works:

  • heal Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unknown Contents (armor up)
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
      • Unit - Add Frost Armor to (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Undead Lich - Frost Armor (Target unit of ability being cast)
      • Custom script: call RemoveLocation(udg_Temp_Point)
 
Level 5
Joined
Mar 6, 2015
Messages
130
the trigger structure seems to be fine i think the problem is your main spell can you explain about it what is it ? does it have unit target point target or its no target and your dummy effect spells make sure that (text-order string use/turn on ) is exactly the same thing that you use in the trigger for ordering . check out the order trigger should the target of issue order be the target unit of ability being cast or caster unit i don`t know your native spell but the method is alright i think you must check the text-order string in object editor and revise it if it not the same order string that you used in trigger
.
 
Are you sure your dummy have the manna?

Every time you face this kind of problem, replace your dummy caster with a footman. This allows you to see weather the unit spawns on the right place, get the ability correctly and is ordered to cast that ability. This will make your problem much more visible. There can be many reasons why it doesn't work... for example you cannot give a hero flame strike ability to a normal unit.

In your flame strike spell, you can see clearly that the triggering unit is casting the spell. the Last Created Unit is suppose to cast it.

oh and here is a leak:
  • Unit - Order (Triggering unit) to Human Blood Mage - Flame Strike (Position of (Target unit of ability being cast))
 
Level 3
Joined
Mar 1, 2015
Messages
53
Flamestrike works now by fixing the leak, and heal works now by changing dummy into a hero unit, no idea why does it functions this way but it works so Ill just leave it as it is now.
 
Level 6
Joined
Aug 31, 2014
Messages
137
there are pre made spells in the game you shouldnt add the spells to the dummys you should pre make the dummys with the spells
[trigger=dummyspell]Acid Arrow
Events
Unit - Demon Archer 0042 <gen> Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Arrow
Actions
Custom script: local location udg_point
Custom script: local unit udg_target
Set point = (Position of (Target unit of ability being cast))
Set Target = (Target unit of ability being cast)
Wait 2.00 game-time seconds
Unit - Create 1 dummy-2 for Player 8 (Pink) at point facing Default building facing degrees
Set DUMMY2 = (Last created unit)
Unit - Order DUMMY2 to Neutral Alchemist - Acid Bomb Target
Wait 0.50 game-time seconds
Unit - Remove DUMMY2 from the game
Custom script: call RemoveLocation (udg_point)
Custom script: set udg_point = null
Custom script: set udg_target = null[/trigger]

heres one the spells ive had help an or done use it as an exmpale *excuse the wait timers they were needed....* :)
 
Status
Not open for further replies.
Top