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

Unit Variables in Events--Not working

Status
Not open for further replies.
Level 2
Joined
Nov 1, 2012
Messages
12
I can't select a unit variable in the events "unit enters region" and "unit within range" How come?

If its impossible to do this, what is some way I could count the number of units within a certain range of a unit and modify a value (armor, attack time, damage, etc) based on it while the unit remains in that area?
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Radamantus is right. First, u need to create a setup trigger and then add the event to the trigger that u want to do. Something like this:
  • Setup
    • Events
      • -------- The event that leads to the unit (which means that the unit will now available in the trigger that u want to do --------
    • Conditions
    • Actions
      • -------- First, set the variable --------
      • Set tempUnit = (Triggering unit)
      • -------- then add the event to the trigger that u want --------
      • Trigger - Add to (Ur trigger) the event (Unit - A unit comes within (the range u want) of tempUnit)
      • -------- THE TRIGGER THAT U WANT TO ADD EVENT INTO MUST BE CREATE WITHOUT EVENT, ONLY ACTIONS AND CONDITIONS. --------
About the second part in ur question, I'm not really understand it. Can u explain more?
 
Level 2
Joined
Nov 1, 2012
Messages
12
The ability I'm trying to create is a passive that counts the number of enemy units within a certain range and then grants him bonus attack speed based on that number. For example, at rank 1, it might give 3% attack speed per nearby unit, so if there were 5 units within, say, 600 range, he'd get 15% bonus AS.

On your sample trigger, would that be in a separate trigger from the one actually checking for the number of units? Or would that actually be the trigger itself? Also, what is "The event that leads to the unit"?
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Does ur passive have any cap of AS it can increase? I can make it for u if u give me more details.
For "the event that leads to the unit", since I dont know how to describe it in English so I have tried my best in that sentence :D. What I mean is that after something happens, the checking trigger will be activated and the Hero will be added to the Checking trigger's event. That's what I means.
 
Level 2
Joined
Nov 1, 2012
Messages
12
If you'd be willing to make the trigger for me, that'd be fantastic :D

The spell has four ranks. So for each unit within 200 range of the hero, he gets 3/6/9/12% extra AS. The cap would be 30/60/90/120 extra attack speed, and when a unit left the range, he'd lose the attack speed for that unit.
 
Status
Not open for further replies.
Top