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

[Spell] Need a work-around beyond my own skills

Status
Not open for further replies.
Level 4
Joined
Jun 30, 2014
Messages
72
See, I made an Orb of lightning(new)-based passive, and made an auto-targeting acquire-attack trigger. It's a workaround for the passive not firing when an enemy wanders close enough to chase, but no attack order is given by the player. Orb of Slow/Lightning skills do this, it's one of their quirks.

The problem is that it uses a Specific Unit Event. Like so:
  • Unit - Demon Warrior 0001 <gen> Acquires a target
    • Unit - Order Demon_Warrior to Attack (Targeted unit)
(I set that pre-placed unit (Demon Warrior 0001 <gen>)to a variable (Demon_Warrior) to make it easier for some other triggers. It just made sense to use it here too.)

This works only in a map where players can't pick their Hero(pre-placed Hero). If I made multiplayer maps, i.e. multi version of this, I plan to have a Hero-choose system.

Is there a way to put a "unit acquires target" event on a Player Unit or Generic Unit event?
Is there a way to make a Specific Unit Event accept a unit that doesn't exist yet, but will at the time when the trigger is used?

I need a JASS-free, codeless, scriptless solution, worldedit triggers only...
Sorry for obnoxious long post.
 
Level 25
Joined
Sep 26, 2009
Messages
2,381
It is possible to add specific unit event to trigger. The problem is that you cannot remove those events even when said unit dies - the only way to remove events is by completely destroying and recreating the trigger itself. That, however, is done purely via jass. The problem comes when there are simply too many events for one trigger - it slows the trigger down and may cause the trigger to crash or something like that.
If you want it just for each hero unit controlled by player, then it should be OK, as it won't get anywhere close to the limit.

When a player picks hero, you will most certainly be able to refer to that picked hero. Then use the action "Trigger - Add new event":
  • Trigger - Add to *some trigger* the event (Unit - *picked hero* Acquires an item)
However there is also the same event for any unit:
  • Unit - A unit Acquires an item
You may use that and some conditions to make sure it is a hero controlled by player. For example this:
  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • (Player number of (Owner of (Triggering unit))) Less than 6
    • ((Triggering unit) is A Hero) Equal to True
This will fire the trigger when the unit who picked the item is a hero and belongs to player 1 up to player 5.
 
Status
Not open for further replies.
Top