• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ovveriding maximum hero ability

Status
Not open for further replies.
Level 5
Joined
Jan 23, 2014
Messages
152
Will the game crash if I add 3 more abilities to a hero(which already has 5)?

My plan is to give the hero those 3 abilities when it morphs, and disable the other 5. and disable the 3 again when in normal form
 
Level 5
Joined
Jan 23, 2014
Messages
152
Ok thanks for the advice. But is there another way? I just checked bleach vs one piece recently, and ichigo is a perfect example of my plan. When he becomes a vasto lorde,his abilities change, and when he reverts back to normal, those added abilities are gone.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I tested this some time ago and the game crashes or ignores any additional abilities.
The solution is to have non-hero abilities that mirror the level of hero abilities.
Keep the non-hero abilities disabled while in normal form, but enable them when morphed. This works perfectly if you have at most 1 hero with this morph per player. If you have more, then you need to disable the ability for specific hero.
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
I tested this some time ago and the game crashes or ignores any additional abilities.

Why would it cause the game to crash? Is there a hard coded limit for the hidden data structure that stores each ability of a unit? I thought new abilities just wouldn't fit on the command card, or mess it up. Did not know it could crash the game.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Hero abilities have a hardcoded limit. I can't remember exactly if it crashes, but no one has found a way to break it (I tried...).

Thus, for your purpose it would probably be better to use normal abilities that are hidden when not morphed.
 
Level 5
Joined
Jan 23, 2014
Messages
152
Thanks Xonok. I think your idea is nice. And thanks to the others for suggesting, +REP to you. But how do I add those non-hero abilities if already have 5 hero abilities and 1 normal ability?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
There is no limit to normal abilities.
Add them all to the unit in object editor(normal and hero ones).

Then disable all the normal abilities through the "Player - Disable abilty for player" action at the start of the game.
Every time your hero morphs, disable the hero abilities and enable the normal ones. When the morph is over, do this in reverse(enable hero, disable normals).
This will make it appear like abilities are switched around.
 
Level 5
Joined
Jan 23, 2014
Messages
152
Awesome! This is what I was going for, but I couldn't figure out how. Thank you! :D
 
Status
Not open for further replies.
Top