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

[Solved] Wrong event?

Status
Not open for further replies.
Level 8
Joined
Aug 18, 2015
Messages
164
Hello, hello!
I have trouble making a "basic" trigger and I'd like some help guys :)
Basically, what I'm trying to do is to:
-convert a unit focused by a spell when he's got the right buff ;
-steal 4% of his life per second for a limited amount of time;
-give an equivalent percentage to my hero ["Tabetha"].

Yet, I meet some issues doing it. I think I can't find the proper event because it won't work, even though the targeted unit has the right buff (activated by Tabetha's spell).

Thanks for any help you could provide!
Here's the trigger:

PS: Sorry for how the trigger looks, it's the fist time I post something here ^^

  • Malediction test
    • Evénements
      • Unité - A unit Reçoit un ordre avec point pour cible
    • Conditions
    • Actions
      • Déclencheur - Turn off (This trigger)
      • Wait 0.80 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • ((Targeted unit) has buff Malédiction (Tabetha)) Egal Ã* TRUE
        • Alors - Actions
          • Unité - Change ownership of (Targeted unit) to (Owner of Tabetha) and Changer couleur
          • Effet spécial - Create a special effect attached to the head of (Targeted unit) using Abilities\Spells\Items\OrbCorruption\OrbCorruptionSpecialArt.mdl
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Wait 1.00 seconds
          • Unité - Set life of (Targeted unit) to ((Percentage life of (Targeted unit)) - 4.00)
          • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
          • Déclencheur - Turn on (This trigger)
        • Sinon - Actions
          • Do nothing
          • Déclencheur - Turn on (This trigger)
 
Level 28
Joined
Feb 18, 2014
Messages
3,579
Sorry, don't understand what the event says, but why too much work on this trigger, you use too many time the wait instead you could use the event '' Every 1:00 second '' plus I suppose the event '' unit has buff'' should be in the main trigger condition.
 
Level 8
Joined
Aug 18, 2015
Messages
164
The event says "Unit issued an order with a point as target". Sorry, I didn't notice it was still in French :/
I guess you're right about the "unit has a buff" condition but I always thought that letting this slot empty meant that the trigger would happen anyway. I don't know if I'm quite clear; it can be tough to use a language that's not yours ^^ Anyway, thanks a lot, I'm going to fix that!
About the event '' Every 1:00 second '', that's what I intended to do at the beginning, but I don't know how to put a second event in the "Actions" section.
 
Level 8
Joined
Aug 18, 2015
Messages
164
Slight improvement but still in progress

Well, as you suggested, I kind of shortened it and changed the event. It's more understandable now but it still doesn't work ^^ I guess the condition is the one thing that causes the malfunction now but I don't know how to rewrite it.
Can you help me some more please?? Thanks everyone!! We're gonna make it!! :ogre_haosis:

  • Malediction test
    • Evénements
      • Temps - Every 1.00 seconds of game time
    • Conditions
      • ((Random unit from (Units in (Entire map))) has buff Malédiction (Tabetha)) Egal Ã* TRUE
    • Actions
      • Déclencheur - Turn off (This trigger)
      • Wait 0.80 seconds
      • Unité - Change ownership of (Picked unit) to (Owner of Tabetha) and Changer couleur
      • Unité - Set life of (Picked unit) to ((Percentage life of (Targeted unit)) - 4.00)
      • Unité - Set life of Tabetha to ((Percentage life of Tabetha) + 4.00)
      • Déclencheur - Turn on (This trigger)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Hmm what's the point of turning the trigger on and off? Also, be aware that this isn't MUI, so if another unit were to cast this same spell, horrible things will happen.

Also, if I'm understanding this spell correctly, all this spell does is convert an enemy unit for X seconds, stealing HP per second to the caster. After the duration is over or if the unit dies, convert back? Is it unit target or point target?
 
Level 8
Joined
Aug 18, 2015
Messages
164
Hmm what's the point of turning the trigger on and off?
Well, I am too accustomed to using this function as a safekey now. I put it everywhere, ahah! :D

if another unit were to cast this same spell, horrible things will happen.
No problem about that. This is a specific spell I created for Tabetha only.

all this spell does is convert an enemy unit for X seconds, stealing HP per second to the caster. After the duration is over or if the unit dies, convert back?

Nope! The spell converts a ennemy unit forever and this unit that is converted loses 4% of his life every second for about 30 seconds. (Therefore, unless, it is healed, it dies after 30 seconds). During the same period of 30 seconds, Tabetha is healed for 4% of her life per second.

Is it unit target or point target?
It should be unit target :)

I hope it is more understandable now. Thanks! :)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
No problem about that. This is a specific spell I created for Tabetha only.
It can still pose a problem if Tabetha were to cast it another time while the previous instance is still running. However, if you don't care about that... you can easily do it like this:

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set Caster = (Triggering unit)
      • Set Owner = (Triggering player)
      • Set Target = (Target unit of ability being cast)
      • Set Counter = 0.00
      • Set Caster_HP = ((Max life of Caster) x 0.04)
      • Set Target_HP = ((Max life of Target) x 0.04)
      • Unit - Change ownership of Target to Owner and Change color
      • Trigger - Turn on Loop <gen>

  • Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Counter = (Counter + 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Caster is dead) Equal to True
              • (Target is dead) Equal to True
              • Counter Greater than or equal to 30.00
        • Then - Actions
          • Trigger - Turn off Loop <gen>
        • Else - Actions
          • Set TempReal = (Life of Caster)
          • Unit - Cause Caster to damage Target, dealing Target_HP damage of attack type Spells and damage type Normal
          • Unit - Set life of Caster to (TempReal + Caster_HP)

I'm not a fan of using 1 second loops for DoTs since it looks way better when the units constantly loses HP instead of intervals, however to stop it from being too complex, I went ahead and just used a 1 second timer. Also, you should use "Unit - Damage Target" so that the caster can get proper credits for killing the target. If you "kill" a unit with Unit - Set Life (To Value), the caster will not get proper credits for the kill.
 
Level 8
Joined
Aug 18, 2015
Messages
164
Woah! *-* Thanks!!!!
That's seem a bit complex to me but I'm gonna try it and I'll tell you what!

It can still pose a problem if Tabetha were to cast it another time while the previous instance is still running.
I thought about that but the re-loading time of the ability is greater than the duration of the ability itself.

Edit:
YEAAAAAAAAAAH!! That WORKS!!! Thanks, thanks, thanks a lot! I was beginning to despair but that eventually works!!!
Your explanations are priceless!!
That's wasn't quite as complex as I expected once I figured the role of each variable! I should use them more often!! :)

it looks way better when the units constantly loses HP instead of intervals
I'm getting there, someday ^^ Step after step, I'm getting closer!

you should use "Unit - Damage Target" so that the caster can get proper credits for killing the target. If you "kill" a unit with Unit - Set Life (To Value), the caster will not get proper credits for the kill.
You see, that's typically the kind of details I wouldn't think to check by myself! Thanks again!

Anyway, I came here with little hope and you taught me! That's really great! Thank you again and have a great night!! (-^_^-)
 
Last edited:
Status
Not open for further replies.
Top