• 🏆 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] Conflagration Dummy level up problem

Status
Not open for further replies.
Level 12
Joined
May 28, 2015
Messages
382
I need help.. I want my dummy ability to have the same level as the main ability, however I do not know how to make that happen.

Here's the main trigger: This works just fine.

  • Conflagration Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Conflagration
    • Actions
      • Set con_casterloc = (Position of (Triggering unit))
      • Unit - Create 1 DummyCaster 1 for (Owner of (Triggering unit)) at con_casterloc facing Default building facing degrees
      • Unit - Add conflagration dummy (Initial) to (Last created unit)
      • Unit - Set level of conflagration dummy (Initial) for (Last created unit) to (Level of Conflagration for (Triggering unit))
      • Unit - Order (Last created unit) to Neutral - Parasite (Target unit of ability being cast)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_con_casterloc)
Here's the trigger where the effect spreads when the enemy unit dies: This is where I have problems leveling the dummy ability.

  • Conflagration Spread
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Conflagration Dummy
    • Actions
      • Set con_summonloc = (Position of (Summoned unit))
      • Set con_owner = (Owner of (Summoned unit))
      • Unit - Remove (Summoned unit) from the game
      • Unit - Create 1 Conflagration Dummy for con_owner at con_summonloc facing Default building facing degrees
      • Unit - Add conflagration dummy (Secondary) to (Last created unit)
      • Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)
      • Set con_unitgroup = (Units within 250.00 of con_summonloc matching (((Matching unit) belongs to an enemy of con_owner) Equal to True))
      • Unit Group - Pick every unit in con_unitgroup and do (Actions)
        • Loop - Actions
          • Unit - Set level of conflagration dummy (Secondary) for (Last created unit) to (Level of Conflagration for (Triggering unit))
          • Unit - Order (Last created unit) to Neutral - Parasite (Picked unit)
      • Custom script: call RemoveLocation(udg_con_summonloc)
      • Custom script: call DestroyGroup(udg_con_unitgroup)
 
Level 12
Joined
May 28, 2015
Messages
382
so basically like this:

  • Actions
    • If - Conditions
      • (Unit-type of (Summoned Unit)) is equal to Conflagration Dummy 1
    • Then - Actions
      • Unit - Set level of conflagration dummy to 1
    • Else - Actions
etc.

One question tho.. How do I detect the level of the ability in order for me to create the dummy equivalent to the level? Like what triggers for the trigger to spawn the dummy 1.?
 
Level 10
Joined
Apr 4, 2010
Messages
509
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Dummy_Unit[1] = Dummy
      • Set Dummy_Unit[2] = Dummy 2
      • Set Dummy_Unit[3] = Dummy 3
  • Melee Initialization
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Summoned unit)) Equal to Dummy_Unit[1]
          • (Unit-type of (Summoned unit)) Equal to Dummy_Unit[2]
          • (Unit-type of (Summoned unit)) Equal to Dummy_Unit[3]
    • Actions
      • Set Loc = (Position of (Summoned unit))
      • Set Player = (Owner of (Summoned unit))
      • Unit - Create 1 Dummy_Unit[(Level of (Summoned unit))] for Player at Loc facing Default building facing degrees
      • Unit - Set level of Spreading Poison for (Last created unit) to (Level of (Summoned unit))
      • Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)
      • Unit - Remove (Summoned unit) from the game
      • Set Group = (Units within 300.00 of Loc matching (((Matching unit) belongs to an enemy of Player) Equal to True))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Unit - Order (Last created unit) to Neutral - Parasite (Picked unit)
      • Custom script: call RemoveLocation (udg_Loc)
      • Custom script: call DestroyGroup (udg_Group)
Make the level of each dummy unit correspond to their name (in object editor). Dummy 1 = Stats - Level 1, etc.
 
Level 12
Joined
May 28, 2015
Messages
382
Still not working. :( Ill just post my trigger here.

Well, I have two abilities based on parasite.. The 1st one is the initial ability which shoots after the hero has casted. The second ability is the one that takes effect after the affected unit dies. I made the first one's damage per second a lot stronger than the second ability.
 
Last edited:
Level 12
Joined
Nov 3, 2013
Messages
989
Create the dummy unit inside the loop, since you're going to need as many dummies as there are units in the target unit group.

I'd also suggest making an integer variable for (Level of (Summoned unit)) to not make lots of function calls in the loop.
 
Status
Not open for further replies.
Top