• 🏆 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!

[Solved] how to recreate song of the siren?

Status
Not open for further replies.
Level 28
Joined
Feb 18, 2014
Messages
3,579
You mean an AoE sleep ? Well, you need to trigger it. : Create a dummy unit --> Pick every unit within point --> order dummy unit to sleep picked unit.
  • AoE Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Sleep
    • Actions
      • Set Temp_Point_1 = (Target point of ability being cast)
      • Set Temp_Group = (Units within 300.00 of Temp_Point_1 matching ((((Matching unit) is alive) Equal to TRUE) and ((((Matching unit) is A structure) Equal to FALSE) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to TRUE))))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Point_2 = (Position of (Picked unit))
          • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at Temp_Point_2 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Sleep (Neutral hostile) to (Last created unit)
          • Unit - Order (Last created unit) to Undead Drealord - Sleep (Picked unit)
      • Custom script: call RemoveLocation (udg_Temp_Point_1)
      • Custom script: call RemoveLocation (udg_Temp_Point_2)
      • Custom script: call DestroyGroup (udg_Temp_Group)
 
Level 20
Joined
Feb 23, 2014
Messages
1,264
Well, I would have done this trigger a bit differently than @Warseeker (for instance used one temp_point variable or one dummy unit), but that's just me.

What matter is that the trigger above is leaking, because the Temp_Point_2 variable is only cleared at the end of the trigger, meaning that it only applies to the point created from the position of the last unit "processed" by the loop and as such it leaks the points made for other units.

The trigger should, in my opinion, look more like this:

  • AoE Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Sleep
    • Actions
      • Set Temp_Point_1 = (Target point of ability being cast)
      • Set Temp_Group = (Units within 300.00 of Temp_Point_1 matching ((((Matching unit) is alive) Equal to TRUE) and ((((Matching unit) is A structure) Equal to FALSE) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to TRUE))))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Point_2 = (Position of (Picked unit))
          • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at Temp_Point_2 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Sleep (Neutral hostile) to (Last created unit)
          • Unit - Order (Last created unit) to Undead Drealord - Sleep (Picked unit)
          • Custom script: call RemoveLocation (udg_Temp_Point_2)
      • Custom script: call RemoveLocation (udg_Temp_Point_1)
      • Custom script: call DestroyGroup (udg_Temp_Group)
 
Last edited:
Level 21
Joined
Mar 29, 2020
Messages
1,237
I just tried it out (per @MasterBlaster 's specifications + a line for special effect [and its removal]) and its not working:ogre_icwydt: im pretty sure i know why though. when I had it set based around the range of the casting unit the trigger was firing - the special effect in the trigger was working and now that isn't either. so somehow the function of "target point of ability being cast" is not triggering from my channel being cast... is there a problem in the way i set up channel and if so what parameters should i change?

edit: The problem was just that I didn't specify that this was an instant/no target spell and you guys built me triggers with targets.... sooo, I just set Temp_Point1 to position of triggering unit and now it works.

thanks!!!
 
Last edited:
Level 21
Joined
Mar 29, 2020
Messages
1,237
Screenshot (26).png

what is this derp and why isn't it letting me give you guys +rep?
 
Level 20
Joined
Feb 23, 2014
Messages
1,264
The problem was just that I didn't specify that this was an instant/no target spell and you guys built me triggers with targets.... sooo, I just set Temp_Point1 to position of triggering unit and now it works.
That's good to hear :)

View attachment 354271
what is this derp and why isn't it letting me give you guys +rep?
There's a 24h time limit for giving + rep to the same person, if you haven't me or Warseeker reputation in the last 24 hours and you would want to do that, but the site for some reason doesn't allow you to do it, it would be best to describe the issue here: Site Discussion

why create a seperate dummy for each target and not just create 1 dummy with no casting interval (or whatever that is called) and endless range to cast all of these?
Using a single dummy caster is one of the changes I would have done to the trigger above, but realistically - either way will work, though spawning a dummy every time a spell is cast might be a tiny bit less efficient. That said, you won't really notice it in game anyway, so just do whichever you prefer :)
 
Last edited:
Status
Not open for further replies.
Top