Help with triggered Death Coil

Kike

Member
Reaction score
3
Hi helpers! I were doing a spell that may look like the death coil spell, the base ability is a dummy ability becouse of the limits of death coil of course... Here are my triggrers:


[trigger]Death Coil
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Death Coil
Actions
Set TempReal = (Life of (Target unit of ability being cast))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) belongs to an ally of (Owner of (Casting unit))) Equal to True
(Level of Death Coil for (Casting unit)) Equal to 1
Then - Actions
Set TempReal = (TempReal + (100.00 x 1.00))
Else - Actions
Set TempReal = (TempReal - (50.00 x 1.00))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) belongs to an ally of (Owner of (Casting unit))) Equal to True
(Level of Death Coil for (Casting unit)) Equal to 2
Then - Actions
Set TempReal = (TempReal + (100.00 x 2.00))
Else - Actions
Set TempReal = (TempReal - (50.00 x 2.00))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) belongs to an ally of (Owner of (Casting unit))) Equal to True
(Level of Death Coil for (Casting unit)) Equal to 3
Then - Actions
Set TempReal = (TempReal + (100.00 x 3.00))
Else - Actions
Set TempReal = (TempReal - (50.00 x 3.00))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) belongs to an ally of (Owner of (Casting unit))) Equal to True
(Level of Death Coil for (Casting unit)) Equal to 4
Then - Actions
Set TempReal = (TempReal + (100.00 x 4.00))
Else - Actions
Set TempReal = (TempReal - (50.00 x 4.00))
Unit - Set life of (Target unit of ability being cast) to TempReal[trigger/]

It isn't working :/ it heal friends by 100 at level four and damages near 500 the enemys at level four too :C can someone give me a hint? thank you!

Off topic: 100 posts today :D
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Maybe you tell us first what your spell is supposed to do, what it is doing now and what you want to be changed before we read through your wall of code and try to find it out by ourselfs.
 

Kike

Member
Reaction score
3
okay... this is spell is supposed to heal 100/200/300/400 frindly units and deal 50/100/150/200 damage to enemy foes, same thing of the Death Coil... but instead of heal undead and hurt alives... it isn't working becouse the values of healing and damaging are crazy --'
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Do it like this:
Code:
Event
 a unit starts the effect of an ability
Condition
 ability being cast == MY_AWESOME_SPELL
Actions
 set Tmp_Int = 100 * Level of (Ability being cast) for (Triggering Unit)
 if (Owner of Target unit of Ability being cast is an ally of Owner of Triggering Unit == false){
  set Tmp_Int = Tmp_Int / 2
  unit - deal Tmp_Int damage of damage type Magic and kind Unknown to (Target unit of ability being cast)
 }else{
  unit - deal Tmp_Int * -1 damage of damage type Magic and kind Unknown to (Target unit of ability being cast)
 }
 

Smitty

Member
Reaction score
20
What's the spell based on? Try this;

Events: A unit begins the effect of an ability

Conditions: Ability being cast equal to death coil

Actions:
IF; Target unit of ability being cast belongs to an ally of owner of triggering unit

THEN; Set life of target unit of ability being cast to life of target unit of ability being cast+100(level of death coil for triggering unit)

ELSE; Cause triggering unit to damage target unit of ability being cast dealing 50(level of death coil for triggering unit)
 

Kike

Member
Reaction score
3
Code:
  unit - deal Tmp_Int damage of damage type Magic and kind Unknown to (Target unit of ability being cast)
I couldn't find this action in my editor, can you be more specific?


EDIT: I could't find neither the action (level of death coil for triggering unit), is to I create 1 trigger for each spell of mine and swap the (level of...) for the number of my level (1-2-3-4)?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
1. Unit - Damage Target.
2. Level of Ability for Unit. It's an integer. Choose it inside an Arithmetic function.
 

Kike

Member
Reaction score
3
I'm at the Arithmetic section.... there isn't there, I used it when setting variebles but i don't know why, this time it isn't working :c can someone upload a map only with this function for me?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top