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

Leaking Character Replacement

Status
Not open for further replies.
Level 11
Joined
Sep 9, 2010
Messages
368
Hello, I'm working on a map that contains a hero that will be able to phase between two different units (Like the bear form spell).
The idea is that the hero will be changing between two different units who conains different spells and names, but the problem is that the trigger for this spell is leaking:

  • Actions
    • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
    • Set ShadowAbilites[1] = (Level of Aura of the Wise for (Casting unit))
    • Set ShadowAbilites[2] = (Level of Light of healing for (Casting unit))
    • Set ShadowAbilites[3] = (Level of Bless for (Casting unit))
    • Set ShadowAbilites[4] = (Level of Power Word: Immortality for (Casting unit))
    • Set ShadowAbilites[5] = (Unspent skill points of (Casting unit))
    • Unit - Replace (Casting unit) with a Shadowtooth Death Priest using The old unit's relative life and mana
    • Hero - Set (Last replaced unit) Hero-level to (Hero level of (Casting unit)), Hide level-up graphics
    • Hero - Modify unspent skill points of (Last replaced unit): Set to 0 points
    • Hero - Modify unspent skill points of (Last replaced unit): Add ShadowAbilites[5] points
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ShadowAbilites[1] Not equal to 0
      • Then - Actions
        • Unit - Add Protecting Shadows to (Last replaced unit)
        • Unit - Set Protecting Shadows for (Triggering unit) to ShadowAbilites[1]
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ShadowAbilites[2] Not equal to 0
      • Then - Actions
        • Unit - Add Mind-eating Shadow to (Last replaced unit)
        • Unit - Set level of Mind-eating Shadow for (Last replaced unit) to ShadowAbilites[2]
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ShadowAbilites[3] Not equal to 0
      • Then - Actions
        • Unit - Add Wrath to (Last replaced unit)
        • Unit - Set level of Wrath for (Last replaced unit) to ShadowAbilites[3]
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ShadowAbilites[4] Not equal to 0
      • Then - Actions
        • Unit - Add Power Word: Hate to (Last replaced unit)
      • Else - Actions
    • Selection - Select (Last replaced unit) for (Owner of (Casting unit))
It is just the second spell (aka Light of Healing -> Mind-eating Shadow) that isn't working.


Please help me, the reward is +rep of course. :ogre_hurrhurr:
 
Level 11
Joined
Sep 30, 2009
Messages
697
Your leaking a special effect.

  • Unit - Set Protecting Shadows for (Triggering unit) to ShadowAbilites[1]
should be:

  • Unit - Set Protecting Shadows for (Last Replaced Unit) to ShadowAbilites[1]
also:

  • Hero - Set (Last replaced unit) Hero-level to (Hero level of (Casting unit)), Hide level-up graphics
and:

  • Selection - Select (Last replaced unit) for (Owner of (Casting unit))
cant work because they are referring to a null unit. store these values in a variable before replacing.
 
Level 11
Joined
Sep 9, 2010
Messages
368
Your leaking a special effect.


  • Unit - Set Protecting Shadows for (Triggering unit) to ShadowAbilites[1]
should be:


  • Unit - Set Protecting Shadows for (Last Replaced Unit) to ShadowAbilites[1]
also:

Hmm... I thought that I'd change out all '(Triggering Unit)' to '(Last Replaced Unit)'. I hope that you can wait with the rep, since I want to test this :ogre_hurrhurr:

also:


  • Hero - Set (Last replaced unit) Hero-level to (Hero level of (Casting unit)), Hide level-up graphics
and:


  • Selection - Select (Last replaced unit) for (Owner of (Casting unit))
cant work because they are referring to a null unit. store these values in a variable before replacing.

Well, this is working for me somehow :S
 
It works. It doesn't return null, I think the unit is saved in that trigger instance.
Change all the 'Casting Unit's into 'Triggering Unit's though, and replace 'Triggering Unit's with 'Last Replaced Units'.
Also destroy the special effect immediately(it plays all the animations first, so you don't need waits or timers).
 
Level 11
Joined
Sep 9, 2010
Messages
368
Okey, Now am I really confused... the triggers works excellent when the character learns his spells from the second form (shadow form in this case). But if I tries the vice versa, the Mind-eating Shadow spell or the Light of healing spell missing.
 
Level 11
Joined
Sep 9, 2010
Messages
368
I'm at school atm, so I can't attach the map 'til 16:30 (GMT +1) or later.

And Koba, the unit can just phase between two characters who contains unique spells and if you've learned one on one of the character, you'll have another spell for the other character when you're morphing them.


Because of that I've already have revealed the spell names can I tell you their purposes.

The concept is to change between a healer and a dps.
Priest

1. Aura of the wise (int aura)
2. Light of healing (Healing spell)
3. Bless (Chain Healing spell)
4. Power Word: Immortality (Big bad voodo)
When the Priest uses the spell 'Shadowform' will all the learned spells be exchanged.
etc. if you've learned the int aura, will it be replaced with a armour aura with the same amount levels as the first spell.


The concept is to change between a healer and a dps.
Death Priest

1. Protecting Shadows (Armour aura)
2. Mind-eating Shadow (dmg+stun spell)
3. Wrath (Chain dmg spell)
4. Power Word: Hate (Immolation)

The problem is that the second spell, Mind-eating shadow and Light of Healing isn't working. The triggers looks exactly as the other spells' but somehow is the spell dissapearing when shapeshifted.


But, when I try to learn the spell from the shadowform (the hero start in 'holyform') the spell works. at least for a while.




I hope I explained this better now :ogre_hurrhurr:
 
Try this!
Each hero unit has same dummy abilities! (Won't work in another way)
Create description like this for example:
bzz

Aura of the wise/Protecting Shadows - Level x

Description like blablablabla

Increase hero int by
Increase hero armor by
Create dummy unit and move it to hero position each 0.1 seconds for example!
Check hero unit type and change spells!

Do same for other abilities!
Some dummy spells must be active (target unit or instant)
So I suggest you to use Channel spell with different ID ofc!

This will work 100% if you want different spells

If you just change spells and unit form dunno!
 
Status
Not open for further replies.
Top