• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How do you change AOE spells into....

Status
Not open for further replies.
Level 11
Joined
May 16, 2016
Messages
730
if not then what triggers do i use for this
There is only non triggering ability which don't need to trigger. It is Life Steal (channeling, single target, periodic damage)
If use triggers, then you need:
1)Create HASH Table (watch INIT trigger)
2)Create periodic event, which picks all alive units in map, checks their ID and opens HASH table with child ID.
3)Create trigger The unit starts ability of effect. There you need to save in HASH:
If target spell - targeted unit key handle; ability name key handle and periodic timer key.
4) Create trigger which clear HASH table unit's ID child on interrupting channeling. it help to avoid unneccesary picking unit by periodic event.
5)Then see what I've done in EVERY 001 SEC trigger.
If you want to USE periodic event with larger period (0.03 for example instead of 0.01, then you must increase periodic timer key proportionally (see paragraph 3) and "real = real + 0.0X" in periodic event.
 
Level 8
Joined
Jul 29, 2010
Messages
319
There is only non triggering ability which don't need to trigger. It is Life Steal (channeling, single target, periodic damage)
If use triggers, then you need:
1)Create HASH Table (watch INIT trigger)
2)Create periodic event, which picks all alive units in map, checks their ID and opens HASH table with child ID.
3)Create trigger The unit starts ability of effect. There you need to save in HASH:
If target spell - targeted unit key handle; ability name key handle and periodic timer key.
4) Create trigger which clear HASH table unit's ID child on interrupting channeling. it help to avoid unneccesary picking unit by periodic event.
5)Then see what I've done in EVERY 001 SEC trigger.
If you want to USE periodic event with larger period (0.03 for example instead of 0.01, then you must increase periodic timer key proportionally (see paragraph 3) and "real = real + 0.0X" in periodic event.
i meant fires without needing to target an enemy, just a projectile that will go until it hits something, if you understand what i mean
 
Level 10
Joined
Sep 16, 2016
Messages
269
You probably need a shockwave-type spell (MUI) if the damage is a complicated formula.

If you want something easier, when unit start channeling, add him to a specific unit group. Use a periodic timer event that create a dummy every 1s and order it to cast crushing wave. When he stops the spell, remove from the group as well.
 
Level 8
Joined
Jul 29, 2010
Messages
319
You probably need a shockwave-type spell (MUI) if the damage is a complicated formula.

If you want something easier, when unit start channeling, add him to a specific unit group. Use a periodic timer event that create a dummy every 1s and order it to cast crushing wave. When he stops the spell, remove from the group as well.
i'll try that, thank you
 
Level 11
Joined
May 16, 2016
Messages
730
yes, i'm using channel as the base ability, so when i press W the unit does it's attack animation and now all i need is for it to fire bullets at about a rate of 1 second and fire continuously until i stop the channel
This is the same template. I added non target frontal volley (it hits random frontal enemy, but if you want a certain vicitm of the ability just ask me)
 

Attachments

  • Firebolt Volley.w3x
    21.9 KB · Views: 35
Level 11
Joined
May 16, 2016
Messages
730
oh yes, my bad
Here is simplified template of Arrow Shot without any large triggers like the author of Archer Wars used.
You just need to set damage, HIT range, distance and speed in USE ABILITY. That's it.
P.S The Archer Wars author uses the system where you can launch only one arrow from one skill shot. I made the hero is able to hit as more as it can.
 

Attachments

  • ARROW SHOT TEMPLATE.w3x
    21.8 KB · Views: 51
Last edited:
Level 8
Joined
Jul 29, 2010
Messages
319
Here is simplified template of Arrow Shot without any large triggers like the author of Archer Wars used.
You just need to set damage, HIT range, distance and speed in USE ABILITY. That's it.
P.S The Archer Wars author uses the system where you can launch only one arrow from one skill shot. I made the hero is able to hit as more as it can.
Thank you heaps :D :D :D i've intergrated your triggers into my map and it seems to all be working perfectly, thank you so much
 
Level 8
Joined
Jul 29, 2010
Messages
319
Here is simplified template of Arrow Shot without any large triggers like the author of Archer Wars used.
You just need to set damage, HIT range, distance and speed in USE ABILITY. That's it.
P.S The Archer Wars author uses the system where you can launch only one arrow from one skill shot. I made the hero is able to hit as more as it can.
actually i seem to have run into snag, see when i use the ability on my map instead of an arrow firing, it places a building infront of the hero :? very strange
 
Level 8
Joined
Jul 29, 2010
Messages
319
Here is simplified template of Arrow Shot without any large triggers like the author of Archer Wars used.
You just need to set damage, HIT range, distance and speed in USE ABILITY. That's it.
P.S The Archer Wars author uses the system where you can launch only one arrow from one skill shot. I made the hero is able to hit as more as it can.
i'm so silly, when i copied the ability over to my map, it reset the summoned unit to a town hall, i got it now though, thank you
 
Level 8
Joined
Jan 28, 2016
Messages
486
Anyone else getting odd results from the test map? I cannot for the life of me figure out why the peasants are struck multiple times even if they pass the condition of being within the "damage-free" unit group.

Will post triggers soon™

P.S.: @Fruit Forest, is there any reason why you're clearing groups as soon as you're setting them? It seems redundant.
 
Level 11
Joined
May 16, 2016
Messages
730
Anyone else getting odd results from the test map? I cannot for the life of me figure out why the peasants are struck multiple times even if they pass the condition of being within the "damage-free" unit group.
I've tested again and I haven't found the peasants are stuck multipletimes.
P.S.: @Fruit Forest, is there any reason why you're clearing groups as soon as you're setting them? It seems redundant.
I cleaned only dummy group. Dummy group mustn't be overloaded.
 
Level 8
Joined
Jan 28, 2016
Messages
486
I've tested again and I haven't found the peasants are stuck multipletimes.

I cleaned only dummy group. Dummy group mustn't be overloaded.

You store all the peasants into dummygroup and then clear it, all within the map init... I don't get it. o_O

And my bad there on the previous post. I thought I went back and edited it but obviously, I forgot. I copied your triggers into another map and started to simplify them even further when I bumped into a very weird case where if I didn't have the unit group for damaged enemies saved into the hashtable when casting the arrow (the one in the cast trigger; you named the variable group), it would break the system. It's hard to explain so I've posted a map which should make more sense.

The issue I have with this problem is that I can make this work properly with Jass yet my GUI equivalent doesn't work. Anyway, try the map and just in case I've forgotten, my dodgy arrows are on by default (type -switch to go back to your original triggers and vice versa). The rest should be self-explanatory. Hopefully.
 

Attachments

  • Arrow Shot Template (Edit).w3x
    37.5 KB · Views: 39
Level 11
Joined
May 16, 2016
Messages
730
You store all the peasants into dummygroup and then clear it, all within the map init... I don't get it.
It's my habit. I thought if I need to have an empty group, then first you need to create it (I don't know do groups be created automatically without "Set group"
And my bad there on the previous post. I thought I went back and edited it but obviously, I forgot. I copied your triggers into another map and started to simplify them even further when I bumped into a very weird case where if I didn't have the unit group for damaged enemies saved into the hashtable when casting the arrow (the one in the cast trigger; you named the variable group), it would break the system. It's hard to explain so I've posted a map which should make more sense.

The issue I have with this problem is that I can make this work properly with Jass yet my GUI equivalent doesn't work. Anyway, try the map and just in case I've forgotten, my dodgy arrows are on by default (type -switch to go back to your original triggers and vice versa). The rest should be self-explanatory. Hopefully.
I fixed your variant. The problem was in Shoot Arrow Loop. You shouldn't destroy the stored group before the arrow will destroyed. During arrow flying the arrow will collect in its stored group units to keep them of dealing damage.
 

Attachments

  • Arrow Shot Template (Edit).w3x
    34.4 KB · Views: 43
Level 8
Joined
Jul 29, 2010
Messages
319
in the map i'm making, since you two basically came up with a portion of the triggers i'm using i'm gonna put your names in the credits :D

EDIT:
It's my habit. I thought if I need to have an empty group, then first you need to create it (I don't know do groups be created automatically without "Set group"

I fixed your variant. The problem was in Shoot Arrow Loop. You shouldn't destroy the stored group before the arrow will destroyed. During arrow flying the arrow will collect in its stored group units to keep them of dealing damage.

what triggers can i use to detect when a unit gets out of a transport?
 
Last edited:
Level 8
Joined
Jan 28, 2016
Messages
486
It's my habit. I thought if I need to have an empty group, then first you need to create it (I don't know do groups be created automatically without "Set group"

Ahh I see. Nah, normal unit group variables are initialised automatically at map init (i.e.: a group is created for the variable) but unit group arrays are only initialised from 0 to 1; any other index of the array needs a manually created group using the following custom script:

set udg_TempGroup[2] = CreateGroup()

I fixed your variant. The problem was in Shoot Arrow Loop. You shouldn't destroy the stored group before the arrow will destroyed. During arrow flying the arrow will collect in its stored group units to keep them of dealing damage.

I had a go with your map but it still bugs out like before. I didn't even change any of the code. The first arrow always works like it should (deals 1 instance of 20 damage to the peasant) but every subsequent arrow strikes the peasants multiple times. Again, this is for my altered GUI triggers. I posted a sketchy GIF in the spoiler below to show what I mean.

full

EDIT: @Fruit Forest Found the problem. I had a DestroyGroup() call at the end of my Cast trigger which I thought was a RemoveLocation() call this whole time. Unfortunately this brings up more questions than answers for me but I'll create a new thread about it in Triggers & Scripts and stop hijacking this one!
 
Last edited:
Level 8
Joined
Jul 29, 2010
Messages
319
if i have a trigger like this
  • Events
  • Unit - A unit Is issued an order targeting an object
  • Conditions
  • (Unit-type of (Ordered unit)) Equal to Battle Droid (Player)
  • (Unit-type of (Target unit of issued order)) Equal to Tri-Fighter (Ground)
  • Actions
  • Set TriFighter = (Transporting unit)
  • Unit - Change ownership of (Target unit of issued order) to (Owner of (Ordered unit)) and Change color
how can i make this trigger work for 10 players instead of just what ever player triggers the event at a time, so that when a trigger orders variable to change owner, it changes the original unit and not the unit it's currently set as?
 
Last edited:
Level 8
Joined
Jul 29, 2010
Messages
319
My english is "good". Can you describe your problem more clearly for me?
don't worry i believe i have figured it out

EDIT:
i want this trigger to make the selected unit move from left to right, but only if the selected unit is owned by the player that is trying to move it.
  • Events
  • Player - Player 1 (Red) Presses the Left Arrow key
  • Conditions
  • Actions
  • Set StrafePos = (Position of SelectedUnit)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Owner of SelectedUnit) Equal to (Owner of SelectedUnit)
    • Then - Actions
      • Unit - Move SelectedUnit instantly to ((Position of SelectedUnit) offset by (0.00, 0.00))
    • Else - Actions
i'm not sure whether this trigger is correct so i'm asking here.
 
Last edited:
Level 8
Joined
Jan 28, 2016
Messages
486
This trigger is incorrect. Event doesn't detect selected units. YOu should add:
Set group = group in Entire map matching conditions: Matching unit is selected by triggering player etc.
Pick every unit in group and do action
etc etc

True but rather than picking every unit in the map you could set the group to only include the currently selected units of said player. You can then use the approach I quickly put together to order the selected unit to move, stop, etc.

Note that the triggers aren't MPI or MUI (yet) but it's a start. Additionally, the triggers only allow one unit to be issued an order; if multiple units are selected, nothing happens. If each player is only ever in control one unit throughout your game, then you won't need to worry about it being MUI either.

  • Player Select
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Set GroupSelect = (Units currently selected by Player 2 (Blue))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in GroupSelect) Equal to 1
            • Then - Actions
              • Set Caster = (Triggering unit)
            • Else - Actions
              • Set Caster = No unit
          • Custom script: call DestroyGroup( udg_GroupSelect )
        • Else - Actions
          • Set Caster = No unit
  • Player Key Press
    • Events
      • Player - Player 2 (Blue) Presses the Right Arrow key
    • Conditions
      • Caster Not equal to No unit
    • Actions
      • Unit - Order Caster to Move To (Center of (Playable map area))
 
Level 8
Joined
Jul 29, 2010
Messages
319
True but rather than picking every unit in the map you could set the group to only include the currently selected units of said player. You can then use the approach I quickly put together to order the selected unit to move, stop, etc.

Note that the triggers aren't MPI or MUI (yet) but it's a start. Additionally, the triggers only allow one unit to be issued an order; if multiple units are selected, nothing happens. If each player is only ever in control one unit throughout your game, then you won't need to worry about it being MUI either.

  • Player Select
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Set GroupSelect = (Units currently selected by Player 2 (Blue))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in GroupSelect) Equal to 1
            • Then - Actions
              • Set Caster = (Triggering unit)
            • Else - Actions
              • Set Caster = No unit
          • Custom script: call DestroyGroup( udg_GroupSelect )
        • Else - Actions
          • Set Caster = No unit
  • Player Key Press
    • Events
      • Player - Player 2 (Blue) Presses the Right Arrow key
    • Conditions
      • Caster Not equal to No unit
    • Actions
      • Unit - Order Caster to Move To (Center of (Playable map area))
basically, I need the unit to strafe left or right no matter what direction they're facing, will this work?
  • Unit - Order Caster to Move To ((Position of (Triggering unit)) offset by (100.00, 0.00))
 
Level 8
Joined
Jul 29, 2010
Messages
319
True but rather than picking every unit in the map you could set the group to only include the currently selected units of said player. You can then use the approach I quickly put together to order the selected unit to move, stop, etc.

Note that the triggers aren't MPI or MUI (yet) but it's a start. Additionally, the triggers only allow one unit to be issued an order; if multiple units are selected, nothing happens. If each player is only ever in control one unit throughout your game, then you won't need to worry about it being MUI either.

  • Player Select
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Set GroupSelect = (Units currently selected by Player 2 (Blue))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in GroupSelect) Equal to 1
            • Then - Actions
              • Set Caster = (Triggering unit)
            • Else - Actions
              • Set Caster = No unit
          • Custom script: call DestroyGroup( udg_GroupSelect )
        • Else - Actions
          • Set Caster = No unit
  • Player Key Press
    • Events
      • Player - Player 2 (Blue) Presses the Right Arrow key
    • Conditions
      • Caster Not equal to No unit
    • Actions
      • Unit - Order Caster to Move To (Center of (Playable map area))
i did it and decided that it'd be better to have the left and right arrow keys simply change the direction the unit is facing, ironically it's not simple because i have no idea how do to do it, my guess is an arithmetic trigger adding 90 degrees everytime left key is pressed, so i did this
  • Events
  • Player - Player 1 (Red) Presses the Left Arrow key
  • Conditions
  • StrafingUnit Not equal to No unit
  • Actions
  • Unit - Make StrafingUnit face (90.00 + 90.00) over 0.50 seconds
But it just changed the angle my unit was facing to the same point everytime instead of adding another 90 degrees to the angle the unit is currently facing :/
 
Status
Not open for further replies.
Top