A couple of questions/requests

Gwafu

Active Member
Reaction score
12
Come on people, too many views but no single reply!
Okay, lets get this straight.


[1] Is this formula right?

I'm making a Wc2 Healing spell (for my own project ofc). Here's what it does:

Heals the target's lost hitpoints according to the caster's mana, and 6 mana per lost hitpoints of the target.

So, can someone check if the below trigger is correct?

Trigger:
  • Heal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Percentage life of (Target unit of ability being cast)) Less than (<) 100.00
      • (Ability being cast) Equal to (==) Healing
      • (Target unit of ability being cast) Not equal to (!=) No unit
    • Actions
      • -------- Still need to add Rising_Dusk's AbortSpell script here, but it is not fixed yet. --------
      • Set Temp_Real[1] = (((Max life of (Target unit of ability being cast)) - (Life of (Target unit of ability being cast))) / 6.00)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Temp_Real[1] Greater than (>) (Mana of (Triggering unit))
          • Then - Actions
            • Unit - Set mana of (Triggering unit) to 0.00
            • Unit - Set life of (Target unit of ability being cast) to (Mana of (Triggering unit))
          • Else - Actions
            • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - Temp_Real[1])
            • Unit - Set life of (Target unit of ability being cast) to Temp_Real[1]



[2] 100.00 or 1.00?

Trigger:
  • (Percentage life of (Target unit of ability being cast)) Less than (<) 100.00


In this condition, is 100% equivalent to 1.00 or 100.00 ?

[3] Rising_Dusk's Abort Spell Script

The problem is this. I already asked him/her if he/she will fix it, and he/she said that he/she is too busy to fix it and suggested to ask somebody else.

So here, anyone wanna fix it? I really need it.

Okay, that's all for today.
Thanks in advance!
~Gwafu aka supertoinkz
 

Gwafu

Active Member
Reaction score
12
There is.

Okay, tested the Healing spell and did not work as I expected. Something is wrong.
 

Cheddar

This is the way it was meant to be.
Reaction score
126
What happened? Be more detailed than "it didn't work", it'll help us more.

And, looking at the second-to-last part of the trigger, it sets the caster's mana to 0, then the target's hp to the caster's mana, which is 0. Did the target die or does nothing happen?
 

educator

New Member
Reaction score
9
im probably wrong but im pretty sure that the "replenish life" ability used by the night elf moon wells has an ability just like the one in wc2.you just need to edit it a bit (im pretty sure that your talkn bout the paladons ability which was 4 mana to heal 1 life)
 

Gwafu

Active Member
Reaction score
12
You're right, never thought of that ability.

Okay guys, the first two questions are answered. Last request ^_^.
 

Cheddar

This is the way it was meant to be.
Reaction score
126
I asked a question in my earlier post that wasn't answered; I'll be more able to help if it's answered.
 

Gwafu

Active Member
Reaction score
12
/@ educator

Okay, I just saw that it is an autocast ability.

/@ Cheddar

Okay, tested it.
The caster has 6 mana
The ability has 1 mana cost
The target has 29 hitpoints and a maximum hitpoints o 30

In this test, I was expecting the caster will have 0 mana and the target will have 30 hitpoints.

But amazingly, the target's hitpoints became 4.
Something is definitely wrong.
 

NotInTheFace

Member
Reaction score
17
So, can someone check if the below trigger is correct?

I'll do my best :)

Trigger:
  • Set Temp_Real[1] = (((Max life of (Target unit of ability being cast)) - (Life of (Target unit of ability being cast))) / 6.00)

This should be ... * 6.00 not ... / 6.00 since you are calculating the mana cost, which is 6 times the hp restored.

Trigger:
  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Temp_Real[1] Greater than (>) (Mana of (Triggering unit))
    • Then - Actions
      • Unit - Set mana of (Triggering unit) to 0.00
      • Unit - Set life of (Target unit of ability being cast) to (Mana of (Triggering unit))
    • Else - Actions
      • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - Temp_Real[1])
      • Unit - Set life of (Target unit of ability being cast) to Temp_Real[1]

should be changed to
Trigger:
  • Set CurHPVar = life of (Target unit of ability being cast)
    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Temp_Real[1] Greater than (>) (Mana of (Triggering unit))
      • Then - Actions
        • Unit - Set life of (Target unit of ability being cast) to (CurHPVar + ((Mana of (Triggering unit) / 6.00)))
        • Unit - Set mana of (Triggering unit) to 0.00
      • Else - Actions
        • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - Temp_Real[1])
        • Unit - Set life of (Target unit of ability being cast) to (CurHPVar + (Temp_Real[1] / 6.00))


Hope that helps. It was freehanded, so beware :)
 

Laiev

Hey Listen!!
Reaction score
188
pause/unpause unit is a bit bad.. you should use other ways instead of wait peoples to fix they system
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top