• 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.

Different Corpse: Different Skeleton

Status
Not open for further replies.
Level 16
Joined
May 2, 2011
Messages
1,350
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