• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] slowley not killing!

Status
Not open for further replies.
Level 5
Joined
Mar 21, 2007
Messages
155
hi, i am making an area of my map where it is desert. and when a unit enters the desert, thier movement speed is slowed, they take 1 damage per 2 seconds, and they have a special effect on them. and when they come out of the desert, all of that goes away within 30 seconds (or somthing like that)

but i confuzzle myself every time i try this, these are my current triggers, they will hold if only 1 unit is in the desert, but more than 1 and i think it could get messy, can anyone see a solution??

  • desert
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in desert1 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Remove All buffs from (Picked unit)
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 1.00 damage of attack type Chaos and damage type Normal
          • Unit - Set (Picked unit) movement speed to 100.00
          • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\Doom\DoomTarget.mdl
          • Wait 1.80 seconds
          • Special Effect - Destroy (Last created special effect)
-and my other one-

  • desert canceling
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked unit) has buff Wind Running ) Equal to False
        • Then - Actions
          • Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
        • Else - Actions

ty
 
Last edited by a moderator:
Level 5
Joined
Jan 15, 2007
Messages
199
Trigger:
desert
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in desert1 <gen>) and do (Actions)
Loop - Actions
Unit - Remove All buffs from (Picked unit)
Unit - Cause (Triggering unit) to damage (Picked unit), dealing 1.00 damage of attack type Chaos and damage type Normal
Unit - Set (Picked unit) movement speed to 100.00
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\Doom\DoomTarget.mdl
Wait 1.80 seconds
Special Effect - Destroy (Last created special effect)
-and my other one-

Trigger:
desert canceling
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Wind Running ) Equal to False
Then - Actions
Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
Else - Actions

ty

First, you never add "Wind Running" to the guy thats in the desert
also, using set to default move speed is a bad idea, incase you have any other slow effects, it will reset then change their movement permanently
In the second trigger, picked unit is never defined, so that will not work
also, as poot said, everything will delay and glitch, so you dont want to put the wait in the loop.. you could call another function within that loop to have the wait and destroy the spec eff
 
Level 5
Joined
Mar 21, 2007
Messages
155
umm, how would i add a buff to a unit?? i'm thinking about making a buff (purge re-named with diff effect) for the slow bit, but in the trigger, i can't find add buff to a unit.
(oh and btw, wind running is a diffrent ability, its like wind walking, but u don't go invisi)
 
Level 5
Joined
Jan 15, 2007
Messages
199
no, just make an aura like slow aura(no one ever uses this) and make it have 0 range, and have no effects, and set the buff to something, then you can use Unit - Add Ability (Aura)
or
Unit - Remove Ability (Aura)
i havnt tested, but you might be able to use channel to give a passive buff
 
Level 5
Joined
Mar 21, 2007
Messages
155
hmm, i like the idea of the arura, add it to unit when it enters, and remove it when it leaves.

but 1 problem... i totally SUCK at custom abilities/buffs/effects (i ushally just copy a original ability, make it a hero ability, and change dmg and stuff, works fine with me XD)
could anyone design an arura to do this? or do i have to post a new thread somwhere else?
 
Level 5
Joined
Jan 15, 2007
Messages
199
just take endurance aura, set it to have 1 level, change speed bonus to 0, attack speed bonus to 0, and set the range to 0, then change the buff to whatever your buff is
for a buff all you have to do is change the attachment points, the model, the icon, and the tooltip
 
Level 6
Joined
Mar 2, 2006
Messages
306
you know, you can actually check the terrain type at some location... better than rectangular region, although slightly more difficult triggers...

If you put a wait within a unit group, it will wait before enumerating the next target.
and mess up enumeration process. wait must NOT be present within pick-loops

(erm... there is one, right? Too used to UnitRemoveAbility in JASS)
yep. there is one.

Blarg, just CnP Slow Aura, change the buff to your buff, set the AOE to 0, targets to Self, and slow to 0
EDIT: Bobo beat me to it.
he should use a tornado slow aura because it doesn't have an icon...
 
Level 5
Joined
Jan 15, 2007
Messages
199
Quote:
If you put a wait within a unit group, it will wait before enumerating the next target.
and mess up enumeration process. wait must NOT be present within pick-loops
Waits work fine in a pick every unit and do actions in my experience, i have used them many times

Quote:
Blarg, just CnP Slow Aura, change the buff to your buff, set the AOE to 0, targets to Self, and slow to 0
EDIT: Bobo beat me to it.
he should use a tornado slow aura because it doesn't have an icon...

if you actually READ the posts you would see that at first i said use slow aura, but after i used endurance aura just as a quick example because many people can not find slow aura as easily, also an icon helps, because the whole point of this dummy ability is to show that the unit does indeed have the buff
 
Level 6
Joined
Mar 2, 2006
Messages
306
Waits work fine in a pick every unit and do actions in my experience, i have used them many times...

well keep using it if you wish. as long as you don't teach others to use it...

if you actually READ the posts you would see that at first i said use slow aura

sorry. for some reason i figured he meant modified endurance aura by that...
 
Status
Not open for further replies.
Top