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

How to make this spell?

Status
Not open for further replies.
Level 3
Joined
Sep 17, 2005
Messages
38
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
 
Level 10
Joined
Jul 2, 2004
Messages
690
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
 
Level 3
Joined
Sep 17, 2005
Messages
38
Thanks, the trigger works, but need some modification for level. If i need more help i'll post here.

Ah forgot to mention one thing, how do i make a spesific item for a spesific unit?
 
Level 10
Joined
Jul 2, 2004
Messages
690
Events-
*whatever you want to trigger this*
Conditions-
(unit-type of *event*) equal to *unit*
Actions-
(Give *item*) to (*event unit)
 
Level 3
Joined
Sep 17, 2005
Messages
38
That is not working, waht i mean is like this:

Spesific Item (assume it as Bow)
The only one that can buy it or equip it must be range attacker.
 
Level 10
Joined
Jul 2, 2004
Messages
690
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:

Code:
    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))
 
Level 3
Joined
Sep 17, 2005
Messages
38
Yes i forgot to explain it.

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?
 
Level 10
Joined
Jul 2, 2004
Messages
690
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.
 
Level 3
Joined
Sep 17, 2005
Messages
38
Well if that the case, maybe i should try your suggestion.

It just still that melee ones could buy it, but they got tricked by the trigger :lol:

I'll try the trigger.
 
Level 3
Joined
Sep 17, 2005
Messages
38
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
 
Status
Not open for further replies.
Top