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

Hero with an alternate form

Status
Not open for further replies.
Level 6
Joined
May 11, 2010
Messages
236
Hey guys, so i'm making a hero that has an alternate form, based off the druid's bear form spell. What i'd like is that the alternate form have different abilities, now they dont have to be hero abilities, but i'd like them to become more powerful as the hero levels. So for example, at level 1 the alternate form abilities are at their weakest and when the hero hits level 3, they increase. Though i'm not sure how to do this exactly. + rep for assistance
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
1. don't use bear form since it is for non-hero units only
better use metamorphosis/robogoblin
2. make a trigger like this:
event: a unit starts effect of an ability
condition: ability being cast equal to <your spell>
actions: if unittype of triggering unit == form 1
add spells
set level of ability to level of ability being cast or level of hero or some weird arithmetic thing or whatever
remove other spells
else
add other spells
set level of other ability to some level
remove spells

or something like that
 
Level 6
Joined
May 11, 2010
Messages
236
Thanks, that should work. But dont metamorphosis and robogoblin have durations? How can I make those infinite? + rep
 
Level 6
Joined
May 11, 2010
Messages
236
Ah, does that work for all spells? I discovered that using stormbolt but I thought there was a spell that if it was set to 0 it literally meant 0, but I can't remember which. Anyhow, thanks for your help guys, off to bed :)
 
Level 8
Joined
Jun 26, 2010
Messages
530
No, setting a spel duration to 0 means it will last untill is dispelled or the unit dies. If you want a "zero" duration you have to use 0.01, but the ability will still have some effects. Like, in example, stormbolt will still stop chanelling abilities.
 
Level 6
Joined
May 11, 2010
Messages
236
Alright so i'm still having some trouble with this. I've changed the spell to metamorphosis and i've attempted in making the trigger D4RK_G4ND4LF suggested. It works partially, it gives the alternate form the spells but i'm unsure of how to remove the heroes other spells that he has in his primary form, and then get them back whenever he switches back to his normal form. Along with the level they were at etc. If someone could help me construct the trigger, would be helpful :ned:
 
Level 9
Joined
Dec 17, 2008
Messages
499
Copy your unit. Change the copy's spells. On the Metamorphosis spell, change the "Alternate form unit:" to the one you just made.

Done?
 
Level 6
Joined
May 11, 2010
Messages
236
Not done, that doesn't work as the hero spells that the primary form has are transfered over to the alternate form. Giving the alternate form different spells will just mean it'll have it's spells + the primary forms'.
 
Level 9
Joined
Dec 17, 2008
Messages
499
Damn... well... you can always remove 'em with triggers I guess. Remove spell X from unit Y.
 
Level 6
Joined
May 11, 2010
Messages
236
Yeah but i'm unsure of how to get the spell back after the unit switches back to it's original form, at the same level etc :confused:
 
Level 9
Joined
Dec 17, 2008
Messages
499
Hmm.. Well... you'll need someone more experienced than me for that :p
Wait a day or two and pray some pro map mapmaker will answer.
 
Level 11
Joined
Dec 5, 2009
Messages
846
I should use bear form. And do like this:

  • Melee Initialization
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(bearform))
        • Then - Actions
          • Unit - Remove Your ability from (Triggering unit)
          • Unit - Add Your ability to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(unbearform))
        • Then - Actions
          • Unit - Remove Your ability from (Triggering unit)
          • Unit - Add Your ability to (Triggering unit)
        • Else - Actions
Now when he goes into bearform your ability will be removed. And the other ability will be added same with unbearform thing.
 
Level 6
Joined
May 11, 2010
Messages
236
This looks like it'd work but whenever I use the bear form spell, it uses the mana it costs, and it shows the spells that are meant to be added for a second but then he just goes back to normal. Also, if this does work. How will it remember what level the spells were at when he switches back to his original form? The alternate form won't be a problem as I can make a trigger that checks what level he is and depending on his level, gives him a higher rank of the spell, it's the switching back to the original form thats being a problem.
 
Level 11
Joined
Dec 5, 2009
Messages
846
I guess this COULD work i don't have time to test it. But im not sure.

  • Untitled Trigger 002
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(unbearform))
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Your ability for (Your unit)) Equal to 1
            • Then - Actions
              • Set Int = (Level of Your ability for (Your unit))
              • Unit - Remove Your ability from (Your Unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Your ability for (Your unit)) Equal to 2
            • Then - Actions
              • Set Int = (Level of Your ability for (Your unit))
              • Unit - Remove Your ability from (Your Unit)
            • Else - Actions
            • ETC
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(bearform))
        • Then - Actions
          • Unit - Add Your ability to (Your unit)
          • Unit - Set level of Your ability for (Your Unit) to Int
          • Unit - Remove Yourability from (YourUnit)
        • Else - Actions
As i said this just came into my mind it mb doesn't work.
 
Level 6
Joined
May 11, 2010
Messages
236
I'm trying it right now actually, though im still having this problem that I wasn't having before when I used the bear form spell. My hero isnt changing into his other form, i'll click it and the spells for the other form will come up for a second, and then it'll just turn back off.

^ worked this out, had to make bear form a hero type spell again. Anyway, now whenever I click shapeshift the spell he's meant to get comes up and he loses the other, but then he changes and has no spells, something to do with the cast time or something? Though when I look at the stats I dont see any cast time. I'll keep tinkering with it.

alright, im working this stuff out as I post it. I'll keep tinkering with it. Perhaps improving that trigger might help me, i'm playing with it myself.
 
Level 6
Joined
May 11, 2010
Messages
236
Yeah, doesn't crash it. Do you think you could give me an example of the trigger using hashtables?
 
Status
Not open for further replies.
Top