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

Make Hero cast Custom Spell

Status
Not open for further replies.
Level 3
Joined
Oct 14, 2007
Messages
37
The Spell is based off life-drain

Im trying to create an ability in which if you use siphon mana on a normal unit with no buffs on it, it just transfers mana, but if the unit was banished beforehand, and you siphon mana while Unit is Banished, then it also transfers life as well as mana.

What i Did was created a trigger that, if the hero uses siphon mana on an ethernal unit, the spell changes and the hero recasts a modified life drain that drains mana and life, but here is the Issue

the switching of spells works, but the hero doesnt cast the spell, heres the full trigger:

Code:
Channel Start
    Events
        Unit - A unit Begins channeling an ability
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Ability being cast) Equal to Siphon Mana
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Target unit of ability being cast) has buff Banish) Equal to True
                    Then - Actions
                        Unit - Order (Casting unit) to Stop
                        Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + 75.00)
                        Player - Enable Siphon Mana (Ethernal Targets) for (Owner of (Casting unit))
                        Hero - Modify unspent skill points of (Casting unit): Add 1 points
                        Hero - Learn skill for (Casting unit): Siphon Mana (Ethernal Targets)
                        Unit - Set level of Siphon Mana (Ethernal Targets) for (Triggering unit) to (Level of Siphon Mana for (Casting unit))
                        Player - Disable Siphon Mana for (Owner of (Casting unit))
                        [B]Unit - Order (Casting unit) to Neutral Dark Ranger - Life Drain (Target unit of ability being cast) - Anything wrong with this? the ability is based off DR's Life Drain[/B]
                    Else - Actions
            Else - Actions

Also I noticed Life Drain has no orderstring, so im stumped. any help would be appreciated

If you know of a different way to accomplish what I am trying to do, share it please
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Tip: [trigger][/trigger]

Check if your other spell has order like drainlife etc (orderstring use/active)
and hero may not want to break its spell casting
Add Lifedrain - Pause unit - order to stop - unpause unit - order to drain life
WARNING - the life drain you use needs to drain mana too
 
Level 3
Joined
Oct 14, 2007
Messages
37
No Use

The Orderstring by default is set to "none" in all 4 fields, I tried changing them to "drain" but that was no use, also i tried your idea with the pausing/un-pausing, and that still didn't help

Please I need a way to fix this issue.

If your wondering why i want the ability to drain life when target is ethernal, heres the reason:
-In my map, to heal, there is no fountain, you have to use your abilities, the hero with the siphon mana, his healing wont be obvious, the closest hint is the banish tooltip: "certain spells have extra effects on target", this is so there is no fountain to retreat to. You have to spare mana for a spell that heals you one way or another, in this case, a drain

WARNING - the life drain you use needs to drain mana too
It drains both
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Don't make it "None" and don't make it "Drain".

Any order ID that you use bugs if you have more then 1 in the same unit.
Just change it to anything else that that unit doesn't use.

I also suggest you to make the condition of the spell (spell equal to ---) in the main conditions section so it won't trigger and use memory for no reason whenever a unit casts a spell.
 
Level 3
Joined
Oct 14, 2007
Messages
37
Huh?

By Default all 4 fields of the orderstring are set to "None"

I also read in some post that even if you change it, it appears to have changed, in reality it doesnt. so theres nothing i can do about the "None" orderstring, I tried quite a number of orderstrings of target abilities to no avail

So far, making the hero cast the spell is the only issue, whenever I order the hero to use Siphon mana on a banished unit, the ability changes but it doesnt execute, I need it to execute on its own, if anybody can find a way to do this, please share it, this is the way this hero is going to heal in my RPG

Also if anybody knows of a spell that drains mana and/or life that HAS an orderstring that is NOT "None", please tell me
So far i Have tried out the following base spells:
-Siphon Mana (Blood Mage)
-Life Drain (Dark Ranger)
 
Status
Not open for further replies.
Top