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

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,651
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 37
Joined
Mar 6, 2006
Messages
9,240
You don't need to create separate variables for every spell. For example FROZENPOINT, FROZENGROUP and FROZENRANDOM could be named point, group and random and you can use those same variables for other spells.

There is no need to clear a group if you are going to destroy it.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
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,657
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