• 🏆 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] Mass Replication

Status
Not open for further replies.
Level 4
Joined
Feb 23, 2009
Messages
99
I made an ability using the cluster rockets ability that called 'Mass Replication".
Description:
Mass Replication - [Level 1]
Creates clones of every unit in an area of 400 AoE. Clones deal 50% damage of the original unit, take 200% damage and last for 25 seconds.

And I made a trigger:
Event:
A unit begins casting a spell
Condition:
(Ability being cast) Equal to Mass Replication
Action:
Create 1 dummy at postion of (Casting Unit) facing blah blah
Create 1 Wand of Illusion for (Last created unit)
Add 1 second exp timer for (Last Crtd Unit)
Unit Group - Pick every units within an area of 400 from (target pt of abl being cast) and do (Actions)
Loop-Actions:
Order (Last Crtd Unit) to use (Last created item) to (picked unit)
--------------------------------------------------------------------------
Problem:
When I tested it, only 2 Illusions were made.
BTW, I've changed status of Item Illusions and changed the number of charges for Wand of Illusion to 100.

Help please!
 
Last edited by a moderator:
Level 14
Joined
Nov 18, 2007
Messages
1,084
  • Create 1 dummy at postion of (Casting Unit) facing blah blah
  • Create 1 Wand of Illusion for (Last created unit)
  • Add 1 second exp timer for (Last Crtd Unit)
  • Unit Group - Pick every units within an area of 400 from (target pt of abl being cast) and do (Actions)
  • Loop-Actions:
  • Order (Last Crtd Unit) to use (Last created item) to (picked unit)
From your trigger, it looks like only one dummy unit got created.
You should have organized it like this:
  • Unit Group - Pick every units within an area of 400 from (target pt of abl being cast) and do (Actions)
    • Loop - Actions:
      • Create 1 dummy at postion of (Casting Unit) facing blah blah
      • Create 1 Wand of Illusion for (Last created unit)
      • Add 1 second exp timer for (Last Crtd Unit)
      • Order (Last Crtd Unit) to use (Last created item) to (picked unit)
P.S. If you want to copy your trigger and paste it into the forum, an easier way of doing that would be using Copy as Text. You'll see that if you right click your trigger name underneath "Trigger Functions."
 
Level 4
Joined
Feb 23, 2009
Messages
99
What's the difference? BTW, I've changed all status of Item Illusions and Wand of Illusion. Cooldown 0, Cooldown group 0, etc. but it still doesnt work..(only 2 illusions were made, as always)
 
Level 12
Joined
Aug 22, 2008
Messages
911
Create a dummy for each unit selected and make each dummy cast illusion on its target. A unit can't cast a million spells at once, once each unit casts alone and does not interfere with any other cast, it works fine. Anyways, the item has only three or two times it can cast the ability.
 
Level 6
Joined
Jul 25, 2005
Messages
221
Here is a map I did for you, it works perfectly.
And here is the simple trigger, leaks but that you can fix for yourself.

  • AreaIllusions
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Evil Illusion
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Target point of ability being cast)
      • Item - Create AoeIllusion at (Position of (Last created unit))
      • Hero - Give (Last created item) to (Last created unit)
      • Unit Group - Pick every unit in (Units within 1000.00 of (Target point of ability being cast) matching (((Matching unit) is alive) Equal to True)) and do (Actions)
        • Loop - Actions
          • Hero - Order (Last created unit) to use (Last created item) on (Picked unit)
      • Unit - Remove (Last created unit) from the game
The reason why you don't need a generic expiration timer on the dummy unit is because the backswing and cast point is set to 0, on the dummy, which means that there will be no casting animation, thus the unit can cast how many times he want without delay!
 

Attachments

  • Area Illusion.w3x
    17.6 KB · Views: 45
Level 9
Joined
Oct 17, 2007
Messages
547
Well there IS an easier and faster way of doing it... Assuming that the you need dummies to cast illusions is because you want to show the effects of the spell, write a trigger that groups every unit in that region into a temporary unit group and then for each of them create a duplicate unit (with triggers, not abilities) then add a expiration timer and effects whereever you want them to show up.
 
Level 4
Joined
Feb 23, 2009
Messages
99
Here is a map I did for you, it works perfectly.
And here is the simple trigger, leaks but that you can fix for yourself.

  • AreaIllusions
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Evil Illusion
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Target point of ability being cast)
      • Item - Create AoeIllusion at (Position of (Last created unit))
      • Hero - Give (Last created item) to (Last created unit)
      • Unit Group - Pick every unit in (Units within 1000.00 of (Target point of ability being cast) matching (((Matching unit) is alive) Equal to True)) and do (Actions)
        • Loop - Actions
          • Hero - Order (Last created unit) to use (Last created item) on (Picked unit)
      • Unit - Remove (Last created unit) from the game
The reason why you don't need a generic expiration timer on the dummy unit is because the backswing and cast point is set to 0, on the dummy, which means that there will be no casting animation, thus the unit can cast how many times he want without delay!

THANK YOU SO MUCH!! NOW I CAN FINISH THE STUFF.(that was some evil illusions you gave me)
sorry if it takes too long for me to reply i was on holiday.
(+rep to all of you!)
 
Status
Not open for further replies.
Top