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

Detecting Units with Buff and Alot of other questions

Status
Not open for further replies.
Level 1
Joined
Aug 31, 2011
Messages
2
I'm fairly new to WC3 Map Editor and I'm trying to make a passive spell.
Currently I'm using the Brillance Aura as the spell base.

The spell should replenish nearby (800 radius) allied unit's mana by a certain amount. This amount is determined by the level of the spell that the caster has.

Also, the spell should be MUI but I'm still not familiar with that.

Currently theres also a problem with my spell, its not triggering AT ALL and I have no clue why.
I've tried multiple ways to debug the problem(from changing the Event to "finish casting ability" etc... to removing all conditions) but to no avail.

If anyone can help me debug or spot an error with my GUI trigger it would be greatly appreciated =)

  • Evanescence of Mana
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Triggering unit) has buff Evanescence of Mana ) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units within 800.00 of (Position of (Triggering unit)) matching (((Picked unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Wait 0.01 seconds
          • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\NightElf\Tranquility\TranquilityTarget.mdl
          • Wait 0.01 seconds
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Level of Evanescence of Mana (Cleric) for (Triggering unit)))) x 25.00))
          • Special Effect - Destroy (Last created special effect)


Also I have a few questions about triggers:

1 - Say I have a trigger which Creates a special effect when a spell is cast and destroys it when the spell has finished casting. What would happen if 2 units fulfilled the event and condition of the trigger one second after the other?

2 - Would 2 Instances of the same trigger be created or would it be overwritten?

3 - Is it possible to declare local variables in a trigger itself rather then Set a variable up? (I would like to remove the use of arrays or Global Triggers from my triggers and still make it MUI friendly)

4 - Is it possible to do all this without Jass scripting?

Once again any help at all would be greatly appreciated thanks!
 
• A passive spell doesn't fire with the event "Unit - A unit starts the effect of an ability"; 'starts' implies an action, that's why it is triggered by an active spell.
• Waits inside unit groups do not work.
• If the spells don't use waits, every respective trigger will fire for each instance. Of course it depends on the use.
• Yes, it is possible to declare local variables in GUI:
  • Actions
    • Custom script: local unit u = GetTriggerUnit()
    • -------- Actions here --------
    • Custom script: set u = null
There is a reason why I placed the variable creation right after the Actions branch; the trigger won't recognize it otherwise.
The only exception is inside Unit Group enumerations, Player Groups, Destructable massive pick up, etc.
• Local variables are part of Jass, so, no :p
 
Level 1
Joined
Aug 31, 2011
Messages
2
• A passive spell doesn't fire with the event "Unit - A unit starts the effect of an ability"; 'starts' implies an action, that's why it is triggered by an active spell.
• Waits inside unit groups do not work.
• If the spells don't use waits, every respective trigger will fire for each instance. Of course it depends on the use.
• Yes, it is possible to declare local variables in GUI:
  • Actions
    • Custom script: local unit u = GetTriggerUnit()
    • -------- Actions here --------
    • Custom script: set u = null
There is a reason why I placed the variable creation right after the Actions branch; the trigger won't recognize it otherwise.
The only exception is inside Unit Group enumerations, Player Groups, Destructable massive pick up, etc.
• Local variables are part of Jass, so, no :p

Thanks a lot Pharaoh! So local variables and Jass are the way to go.

Btw I wanted to make a Passive spell similar to Zeus's Static Field from DotA but instead of damaging enemies everytime a spell is cast it would heal mana points of nearby friendly units.

Thats why i'm using Brilliance Aura as a base, as it gives a buff(I made a unique buff for the spell too) which is track-able (I think) AND it is a passive skill (in a sense).
 
Status
Not open for further replies.
Top