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

[Solved] Simple Trigger Behaving Strange. Need Help!

Status
Not open for further replies.
Level 4
Joined
Oct 23, 2016
Messages
85
ManaScalingRejuvenation.png


This is basically Rejuvenation scaling with max Mana, supposed to heal the target 8 times over 8 seconds.

When I cast the ability, the target unit is healed 2 times over 2 seconds and then nothing. It's like the trigger only goes through the loop twice. The amount healed seems to be correct.

What the hell is going on?? Never seen anything like this.

I don't even know where to start looking for the problem. It's probably something stupid I missed.

Any help is appreciated :)
 
Level 5
Joined
Aug 20, 2015
Messages
133
This is basic mistake, u should create periodic trigger and heal unit, using it
  • Healing cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set TempInteger2 = 16
  • Healing heal
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set TempInteger2 = (TempInt2 - 1)
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 1.00)
u shouldnt use waits in loops (or better at all), cus things like Casting Unit becomes null
i m healing unit twise per sec, so it looks smoothly, and i set counter to 16 (duration seconds * 2)
so after all math u should do this (healamount * 0.5)
if counter = 0, then turn healing trig off

ofc, it isnt mui, mpi or even good coded, but i hope, u will come to this later
 
Last edited:
Level 4
Joined
Oct 23, 2016
Messages
85
Thanks!

I tried what you said. Had to add some variables for casting unit and target unit, so the other trigger would recognize them but now it's working like a charm! :grin:

Of course, if you know of a way to make this MUI please tell me. I only have one unit on the map that uses this spell, but it could have two rejuvenations active at the same time which would be neat. (Had to put it on 8 sec CD)
 
Last edited:
Status
Not open for further replies.
Top