I'm trying to make a spell area movement speed and attack speed bonus, just like bloodlust but area effect. And i'm stuck on the trigger. Help me please.
This is my trigger, where did i go wrong?
Haste Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Haste (Level of Haste for (Triggering unit)) Greater than 0 Actions Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit))) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (((Picked unit) is A structure) Equal to False) and ((((Picked unit) is Mechanical) Equal to False) and (((Picked unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True)) Then - Actions Unit Group - Add (Picked unit) to HasteGroup Unit Group - Add (Triggering unit) to HasteGroup Unit - Create (Number of units in (Units within 600.00 of (Position of (Casting unit)) matching (((Picked unit) is in HasteGroup) Equal to True))) Dummy for (Picked player) at (Position of (Picked unit)) facing 0.00 degrees Unit - Add Bloodlust (Haste) to (Last created unit) Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit) Unit - Add a 3.00 second Generic expiration timer to (Last created unit) Else - Actions
673 posts Sunny Singapore, the lil' red dot joined
#2
1. i dont know how many times i said this, but ill say this again. dont EVER use "begins casting an ability". use "starts the effect of an ability". 2. there is no need for "level of ability greater than 0". if you can cast the ability, that means you already have it. 3. you dont need a unit group. not in this trigger, at least. 4. just give the dummy unit the bloodlust ability in the Object Editor.
now we start.
Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Haste Actions Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit)) matching (((Picked unit) belongs to an ally of (Owner of (Casting unit))) Equal to True)) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (((Picked unit) is A structure) Equal to False) and ((((Picked unit) is Mechanical) Equal to False) and (((Picked unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True)) Then - Actions Unit - Create 1 (Dummy Caster) for (owner of Picked unit) at (Position of (Picked unit)) facing default building degrees Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit) Unit - Add a 2.00 second Generic expiration timer to (Last created unit) Else - Actions
673 posts Sunny Singapore, the lil' red dot joined
#6
oh. you got to explain, y'know? if you want to prevent a melee unit from buying the item, then you need to make a dummy item, then check if the buying unit is of a specific unit-type (or in this case, an archer, for example).
if you want a melee unit to drop the Bow, like most RPG maps, then the trigger should be something like this:
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Bow
Actions
Unit - Order (Hero manipulating item) to drop (Item being manipulated) at (Position of (Hero manipulating item))
If i'm using that trigger then the melee hero still could buy it. What i want to is only the range hero can buy it. Am i must put a requirements on the object editor or what?
673 posts Sunny Singapore, the lil' red dot joined
#8
hmmm. well that's kinda tricky. the only way i know is that you make a dummy item. give it the price of the Bow, for example. then check if the buying unit is the melee unit. if he is, remove the item bought and use triggers to add the amount spent back to the buying unit.
Again, where did i go wrong? I'm planning to make frostbite spell. It has 2 kind of spell to combined, the first one is frost bite (frozen) - give a stunned(pause) effect. The second one is shadow strike's poison
Frostbite Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Frostbite Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (((Target unit of ability being cast) is A structure) Equal to False) and ((((Target unit of ability being cast) is Mechanical) Equal to False) and (((Target unit of ability being cast) belongs to an enemy of (Triggering player)) Equal to True)) Then - Actions Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 0.00 degrees Unit - Add a 1.50 second Generic expiration timer to (Last created unit) Unit - Add Frostbite (secondary damage) to (Last created unit) Unit - Set Level of Frostbite (secondary damage) for (Last created unit) to (Level of Frostbite for (Casting unit)) Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Target unit of ability being cast) Else - Actions