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

[Solved] Shapeshifting

Status
Not open for further replies.
Level 4
Joined
Apr 28, 2017
Messages
112
Hello!
I've spent several hours searching for the forums, but none of the posts seems to help my problem fully.

I'm working on a druid hero which can shapeshift with his ulti (custom robo goblin) to bear form. Models & transformation works fine.

What I want is next:

While in druid form hero has set of his own abilities (let's say blizzard, summon water elemental & brilliance aura for example) which he can level.

1) When he shapeshifts to his bear form I want him to have a NEW set of abilities (fan of knives, blink, shadow strike) that correspond with normal form abilities (example, if blizzard is lvl 2, I want fan of knives to be lvl 2 also, if briliance aura is not learned, I don't want bear to have shadow strike).

2) While in bear form he can normally lvl up his BEAR abilities, and when he shapeshifts back to his normal form, his normal form abilities (blizzard etc..) will correspond his bear abilities (If he lvls up shadow strike in bear form, I want him to have briliance aura when he convers back to normal form).


Using my poor skills of coding I managed to get part of the 1) part done myself (except that when he's in bear form that "Red +" button which u use to lvl abilities dissapears)

Bbut the biggest problem occurs when i shapeshift back into normal form. He loses all of his normal form abilities and doesn't retain ability points (Red + button is back)

  • t1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Bear_Form[1] = Fan of Knives
      • Set Bear_Form[2] = Blink
      • Set Bear_Form[3] = Shadow Strike
      • Set Druid_Form[1] = Blizzard
      • Set Druid_Form[2] = Summon Water Elemental
      • Set Druid_Form[3] = Brilliance Aura




  • t2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to BEAR FORM Druid ultimate
    • Actions
      • Wait 2.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Rageclaw (Bear)
        • Then - Actions
          • For each (Integer DruidLoop) from 1 to 3, do (Actions)
            • Loop - Actions
              • Unit - Add Bear_Form[DruidLoop] to (Triggering unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Druid_Form[DruidLoop] for (Triggering unit)) Equal to 0
                • Then - Actions
                  • Unit - Remove Bear_Form[DruidLoop] from (Triggering unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Druid_Form[DruidLoop] for (Triggering unit)) Equal to 1
                    • Then - Actions
                      • Unit - Set level of Bear_Form[DruidLoop] for (Triggering unit) to 1
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Druid_Form[DruidLoop] for (Triggering unit)) Equal to 2
                        • Then - Actions
                          • Unit - Set level of Bear_Form[DruidLoop] for (Triggering unit) to 2
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Druid_Form[DruidLoop] for (Triggering unit)) Equal to 3
                            • Then - Actions
                              • Unit - Set level of Bear_Form[DruidLoop] for (Triggering unit) to 3
                            • Else - Actions
              • Player - Disable Druid_Form[DruidLoop] for (Triggering player)
              • Player - Enable Bear_Form[DruidLoop] for (Triggering player)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Rageclaw (Elf)
            • Then - Actions
              • For each (Integer DruidLoop) from 1 to 3, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Bear_Form[DruidLoop] for (Triggering unit)) Equal to 0
                    • Then - Actions
                      • Unit - Remove Druid_Form[DruidLoop] from (Triggering unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Bear_Form[DruidLoop] for (Triggering unit)) Equal to 1
                        • Then - Actions
                          • Unit - Set level of Druid_Form[DruidLoop] for (Triggering unit) to 1
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Bear_Form[DruidLoop] for (Triggering unit)) Equal to 2
                            • Then - Actions
                              • Unit - Set level of Druid_Form[DruidLoop] for (Triggering unit) to 2
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Bear_Form[DruidLoop] for (Triggering unit)) Equal to 3
                                • Then - Actions
                                  • Unit - Set level of Druid_Form[DruidLoop] for (Triggering unit) to 3
                                • Else - Actions
                  • Player - Enable Druid_Form[DruidLoop] for (Triggering player)
                  • Player - Disable Bear_Form[DruidLoop] for (Triggering player)
            • Else - Actions


EDIT: Here's a map file with triggers / units so you can see for yourself. You're welcome to edit to to test a solutions
 

Attachments

  • TEST.w3x
    236.6 KB · Views: 54
Last edited:
Level 22
Joined
Aug 27, 2013
Messages
3,973
I'll go with a stupid way (Note: This is most likely inefficient)

For example, I want to make an archmage transforms into a paladin using Bear Form (Unit). I tweaked the initial value of Phase variable in the editor to 1 then I continue as you can see below.
  • Shapeshift
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bear Form
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Phase Equal to 1
        • Then - Actions
          • Set Phase = 2
          • -------- ----------------------------- --------
          • -------- ----------------------------- --------
          • Set AbilityLevel[1] = (Level of Blizzard for (Triggering unit))
          • Unit - Remove Blizzard from (Triggering unit)
          • Set AbilityLevel[2] = (Level of Summon Water Elemental for (Triggering unit))
          • Unit - Remove Summon Water Elemental from (Triggering unit)
          • Set AbilityLevel[3] = (Level of Brilliance Aura for (Triggering unit))
          • Unit - Remove Brilliance Aura from (Triggering unit)
          • Set AbilityLevel[4] = (Level of Mass Teleport for (Triggering unit))
          • Unit - Remove Mass Teleport from (Triggering unit)
          • -------- ----------------------------- --------
          • -------- ----------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AbilityLevel[1] Equal to 0
            • Then - Actions
            • Else - Actions
              • Unit - Add Holy Light to (Triggering unit)
              • Unit - Set level of Holy Light for (Triggering unit) to AbilityLevel[1]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AbilityLevel[2] Equal to 0
            • Then - Actions
            • Else - Actions
              • Unit - Add Divine Shield to (Triggering unit)
              • Unit - Set level of Divine Shield for (Triggering unit) to AbilityLevel[2]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AbilityLevel[3] Equal to 0
            • Then - Actions
            • Else - Actions
              • Unit - Add Devotion Aura to (Triggering unit)
              • Unit - Set level of Devotion Aura for (Triggering unit) to AbilityLevel[3]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AbilityLevel[4] Equal to 0
            • Then - Actions
            • Else - Actions
              • Unit - Add Resurrection to (Triggering unit)
              • Unit - Set level of Resurrection for (Triggering unit) to AbilityLevel[4]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Phase Equal to 2
            • Then - Actions
              • Set Phase = 1
              • -------- ----------------------------- --------
              • -------- ----------------------------- --------
              • Set AbilityLevel[1] = (Level of Holy Light for (Triggering unit))
              • Unit - Remove Holy Light from (Triggering unit)
              • Set AbilityLevel[2] = (Level of Divine Shield for (Triggering unit))
              • Unit - Remove Divine Shield from (Triggering unit)
              • Set AbilityLevel[3] = (Level of Devotion Aura for (Triggering unit))
              • Unit - Remove Devotion Aura from (Triggering unit)
              • Set AbilityLevel[4] = (Level of Resurrection for (Triggering unit))
              • Unit - Remove Resurrection from (Triggering unit)
              • -------- ----------------------------- --------
              • -------- ----------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AbilityLevel[1] Equal to 0
                • Then - Actions
                • Else - Actions
                  • Unit - Add Blizzard to (Triggering unit)
                  • Unit - Set level of Blizzard for (Triggering unit) to AbilityLevel[1]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AbilityLevel[2] Equal to 0
                • Then - Actions
                • Else - Actions
                  • Unit - Add Summon Water Elemental to (Triggering unit)
                  • Unit - Set level of Summon Water Elemental for (Triggering unit) to AbilityLevel[2]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AbilityLevel[3] Equal to 0
                • Then - Actions
                • Else - Actions
                  • Unit - Add Brilliance Aura to (Triggering unit)
                  • Unit - Set level of Brilliance Aura for (Triggering unit) to AbilityLevel[3]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AbilityLevel[4] Equal to 0
                • Then - Actions
                • Else - Actions
                  • Unit - Add Mass Teleport to (Triggering unit)
                  • Unit - Set level of Mass Teleport for (Triggering unit) to AbilityLevel[4]
            • Else - Actions
Despite the inefficiency, this could work.

EDIT:
Nope, after several testing. Let's just hope any guys with better knowledge come over to help. ~
 
Last edited:
Level 4
Joined
Apr 28, 2017
Messages
112
Tranformacion - Warcraft 3 Maps - Epic War.com

This is not MUI, but works
And maybe you can use local variables to make it MUI(who cares about super precise timing on something like this?)

This has the same problem as I do. I edited metamorphis in that map of yours to has infinite duration (set duration to 0), and edited gameplay constant so you are able to turn it on/off.
Same problem occurs when you go from Metamorphis back to Maiev - all learned spell (with maiev) disappear

However, when going back to Metamorphis again she all spells are there (that were learned so far) - so this part is good.

How do I make it that she keeps her spells in Maiev form when transforming back ?
 

Attachments

  • TransformacionEdit.w3x
    19.2 KB · Views: 52
Last edited:
Level 7
Joined
Jan 23, 2011
Messages
350
  • Transformacion
    • Acontecimientos
      • Unidad - A unit Finaliza el lanzamiento de una habilidad
    • Condiciones
      • (Ability being cast) Igual a (==) Forma de oso
        • Multiple ConditionsOr - Any (Conditions) are true
          • Condiciones
            • (Unit-type of (Casting unit)) Igual a (==) Guardiana ALTERNA
            • (Unit-type of (Casting unit)) Igual a (==) Guardiana NORMAL
    • Acciones
      • Set Heroe = (Casting unit)
      • Detonador - Run Habilidades <gen> (checking conditions)
      • Set GUARDIANANOMUI = Heroe
      • Wait 1.40 game-time seconds
      • Set Heroe = GUARDIANANOMUI
      • Detonador - Run Habilidades <gen> (checking conditions)
This worked okey, but as i said, it's NOT MUI.
The ability i used is based on Bear Form now, and the condition is for both normal and alternate form
 
Level 4
Joined
Apr 28, 2017
Messages
112
Thanks a lot! Works like a charm! Exactly what I needed.
I only edited this to fit my map (hero won't be able to revive once it's dead so its NP)
  • Conditions
    • (Triggering unit) Equal to Warden NORMAL 0001 <gen>
+ rep!
 
Status
Not open for further replies.
Top