Spell help!

FroznYoghurt

New Member
Reaction score
37
Hi everyone! need some emergency help now plx.
Im working on a spell for the Holy Contest by squll2 and im stuck deep.:(
squll2 said i can ask for help as long as it was nothing major and since it isnt here is my problem;

Code:
Heal on Death
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) has buff [My Buff] ) Equal to True
    Actions 
        Unit Group - Pick every unit in (Units within 400.00 of Target_loc matching (((Matching unit) is alive) Equal to True)) and do (Actions)
            Loop - Actions
                Unit - Create 1 Spell Dummy for (Owner of Caster) at Target_loc facing Default building facing degrees
                Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                Unit - Add Heal (OnDeath)  to (Last created unit)
                Unit - Order (Last created unit) to Human Paladin - Holy Light (Picked unit)

a unit with buff dies all units in an area gets healed, thats all there is to it.... so why wont it work?!!? :banghead:
If i cant get this trigger to work my spell will be dull and boring! help me out and youre so in it for getting rep!
Hopeffully this will also give me a greater understanding in spellmaking so be the hero now!
 

Kuberr24

Well-Known Member
Reaction score
28
since your unit is DEATH, he will not have the BUFF anymore and thus you can never meet the condition "unit has buff".

What you might do is create a boolean variable

when somebody catss the spell that gives the buff, you set UnitWillHealOnDeathBoolean = true.

then, when a unit dies you check if that variable is "true"

Use arrays to make MUI (works for every player, but only 1 unit per player can have it)

and you can use handles/gamecache so it will work for any unit. but considering you're using only gui and you leak like crazy I doubt you're up for it yet.
 

velnias

New Member
Reaction score
13
>Unit - Create 1 Spell Dummy for (Owner of Caster) at Target_loc facing Default building facing degrees
i think u need use owner of dying unit

and target_loc maybe u need action set variable ?
 

FroznYoghurt

New Member
Reaction score
37
Interesting...

Thanks for help but i really need this to work on more units than 1 per player (+rep thought), that it looses its buff on death makes perfect sense, wich only makes it more iretating.:banghead:
I tried a different trigger to add the units to a variable unit group but it didnt work either (guess its the problem there). I just need a clever way to "mark" units.

And ofc ive set the variables, i may be noobish but not that noobish :p
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Quote from tinki3
Periodically group every unit that has the buff,
if they do have it, set their custom value to 1,
else set it to 0.

In your trigger's condition, check that the dying unit's custom value
is equal to 1.

If it is, run the actions.

Why is it that we need to set a unit's CV to 0 if they don't have the buff you ask?
Well, say they did have the buff at one time, then lost it.

They'd be left with a CV of 1, which would also mean the trigger would fire even though the unit doesn't have the buff anymore.

Safety first.
 

FroznYoghurt

New Member
Reaction score
37
friggin great!

This totally helps me out there is no way on earth i could have figured that out! I didnt even know of the custom value thingie, thanks gals! :D (thx to tinkie 2 :cool:)

Well now im back in the game <3, i just kinda suspect that the lousy importability and the leakfreeness of my spell might cut me down a bit but il work on that!

+ rep 2 u! :D and 2 tinkie when i see him... :rolleyes:
 

waaaks!

Zinctified
Reaction score
256
sometimes unitgroups wont work, even if u made the triggers right...

for ur spell...u only want to heal units nearby right?

how about not casting holy light to the picked unit instead of
Code:
Unit - Set Picked unit life to Life of (Picked unit) + 500
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top