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

Different Corpse: Different Skeleton

Status
Not open for further replies.
Level 16
Joined
May 2, 2011
Messages
1,345
Hello,

I made a thread long ago, that I wanted a hero (or necromancer) to raise skeleton that is similar to the dead corpse (elf archer will be raised into skeleton archer and orc grunt will be raised into skeletal orc and footman into warrior and mage into mage) Old Thread
There has been a couple of suggestions to do it with hashtables and all.

However,

I had an idea now and would like to see your opinion on how good this idea may be.

Give necro the ability based of animated dead that raise only 1 unit (can be based of death knight or the item). Have a trigger on the map, that checks for the raised unit with bunch of IF statements. If it was Elf Archer, replace it with skeletal archer, and so on.

what do you think of such idea? would it be possible to implement? would be superior to making hastable?
 
Level 11
Joined
Jun 2, 2004
Messages
849
Indexing a hashtable (or hell, even an array) will pretty much always be superior to long if/else chains. It's easier to implement, easier to maintain, and easier for another programmer to understand.

The only downside is a hashtable has a bit of a learning curve due to the system being hamhandedly bolted on to the game late in its life.
 
Status
Not open for further replies.
Top