• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

im helpless about my spell, help!

Status
Not open for further replies.
Level 6
Joined
Aug 5, 2015
Messages
202
i want making item,, the item having passive spell:
every 9 seconds enemy units within 800 AoE of my hero (item equipped) deal frost nova ability to 1 random unit

i have making trigger wonder why didnt work already try and over thinking for 2 hours still not work

take a look
  • Frost Nova Auto
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |cffff8800Frozen Mask|r
      • (Unit-type of (Hero manipulating item)) Equal to Frozen Knight
    • Actions
      • Set FROZENHERO = (Hero manipulating item)
      • Set FROZENPOINT = (Position of FROZENHERO)
      • Set FROZENGROUP = (Units within 800.00 of FROZENPOINT matching (((Matching unit) belongs to an enemy of (Owner of FROZENHERO)) Equal to True))
      • Trigger - Turn on Frost Nova Auto on <gen>
  • Frost Nova Auto on
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set FROZENHERO = (Triggering unit)
      • Set FROZENPOINT = (Position of FROZENHERO)
      • Set FROZENGROUP = (Units within 800.00 of FROZENPOINT matching (((Matching unit) belongs to an enemy of (Owner of FROZENHERO)) Equal to True))
      • Unit Group - Pick every unit in FROZENGROUP and do (Actions)
        • Loop - Actions
          • Set FROZENRANDOM = (Random unit from FROZENGROUP)
      • Unit - Create 1 Dummy (Frost Nova) for (Owner of FROZENHERO) at FROZENPOINT facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Undead Lich - Frost Nova FROZENRANDOM
      • Unit Group - Remove all units from FROZENGROUP
      • Custom script: call RemoveLocation(udg_FROZENPOINT)
      • Custom script: call DestroyGroup(udg_FROZENGROUP)
 
Level 25
Joined
May 11, 2007
Messages
4,650
In your first trigger you set:
Set FROZENHERO = (Hero manipulating item)

In your timer trigger:
Every 3 seconds you set:
Set FROZENHERO = (Triggering unit)

What unit is triggering the "Every 3 seconds of game time" event?


So simply remove Set FROZENHERO = (Triggering unit) and it should work.


And set Set FROZENRANDOM = (Random unit from FROZENGROUP) instead of picking every unit in the unit group, setting them to FROZENRANDOM and selecting the last random FROZENRANDOM..
 
Level 6
Joined
Aug 5, 2015
Messages
202
thanks a lot sir you solved it in 5 minutes xD
now worked

  • Frost Nova Auto on
    • Events
      • Time - Every 11.00 seconds of game time
    • Conditions
    • Actions
      • Set FROZENPOINT = (Position of FROZENHERO)
      • Set FROZENGROUP = (Units within 800.00 of FROZENPOINT matching ((((Matching unit) belongs to an enemy of (Owner of FROZENHERO)) Equal to True) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) is A structure) Equal to False))))
      • Set FROZENRANDOM = (Random unit from FROZENGROUP)
      • Unit - Create 1 Dummy (Frost Nova) for (Owner of FROZENHERO) at FROZENPOINT facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Undead Lich - Frost Nova FROZENRANDOM
      • Unit Group - Remove all units from FROZENGROUP
      • Custom script: call RemoveLocation(udg_FROZENPOINT)
      • Custom script: call DestroyGroup(udg_FROZENGROUP)
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Also, in the "Unit acquires item" triggger, remove the " Set FROZENPOINT = (Position of FROZENHERO)" and " Set FROZENGROUP = (Units within 800.00 of FROZENPOINT matching (((Matching unit) belongs to an enemy of (Owner of FROZENHERO)) Equal to True))"
Just two things that dont do shit but still leak.
 

Ardenian

A

Ardenian

You need dynamic indexing to make sure your spell can be casted by multiple units at once, so called 'multiple unit instance' ( =MUI).

It seems your spell only supports one cast/unit at the time.

If this is a boss spell, supposed to be only an ability for only one unit/ an unique item that only exists once in your map, then you don't need the dynamic indexing.
 
Level 6
Joined
Aug 5, 2015
Messages
202
how to do dynamic indexing with passive spell every xx seconds pick every unit within 800: picked unit: enemy, create dummy, storm bolt to picked unit

btw what happen if every hero cast that spell at same time if its not mui?
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
When your unit acquires the item, add that unit to a unit group. (Lets call it FrozenMaskGroup.)
This unit group may never be removed.

Using a unit indexer and Custom Value of unit, you can store data for each unit individually.
Every 0.5 seconds of gametime:
you increase a real variable under the index of the custom value of the picked unit by 0.5.
When this value becomes greater than 11, you reduce it by 11 and pick every unit in range of our first unit.
Then you can apply the effects to all the units in range.

When your unit loses the item, you remove it from the group and set the real variable to 0.
You then also check if the group is empty to disable the trigger.



What happens when two units cast an ability that is not MUI?
That depends on what part is not MUI.
If they launch a missile at a point and the missile's data is not MUI, that means that the old missile will not move any more when the second unit has started the trigger.
If the data (like your spell) is stored in just global variables and doesnt allow multiple units to be stored at once, that means that only the last added unit will have the effect.
There are numberless things that go wrong when something is not MUI but what exactly happens depends on what part is not MUI.
In your case, only the last hero that acquired that item will have the effect.
 
Level 6
Joined
Aug 5, 2015
Messages
202
can you show me the trigger? im still a bit confused

how about this? http://www.hiveworkshop.com/forums/...ials-279/creating-some-basic-abilities-32827/
all of them dont have dynamic indexing

WAIT A SECOND
imagine this is dota
if this is allpick, then my triggers is not problem?
since my item can only buyed by 1 type of certain hero.
Hero of another type cant equip that item and since i set my map: only 1 hero per hero type
then my triggers even not MUI, its not problem?
 
Last edited:
Status
Not open for further replies.
Top