• 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 damage depending on target - Need Help Guys!

Status
Not open for further replies.
Level 6
Joined
May 13, 2013
Messages
111
Hello everyone, I need help in my map. If you play MineCraft, you might understand this easier. Ok here I want to have in my map: If the player has pickaxe, he will deal more damage to a Pile of Stones and deal less damage against animals/monsters and trees. If he uses an axe, he will deal more damage to trees and deal less damage against animals/monsters and Pile of Stones. If he uses Sword, he will deal more damage to animals/monsters but deal less damage against Trees and Pile of Stones. Can somebody do that for me?
 
Level 25
Joined
May 11, 2007
Messages
4,650
Either you use GreeN!X's system and use units instead of destructibles. You can then choose to either use an armor system, or use unit-specifications to deal more damage (Undead, Tauren, Mechanical, Ancient etc).

If you still want to use destrictubles, you have the fun way of using triggers for the damage, and then use If then else cases:

This happens when a destruct is either attacked or an ability is used on them, it's up to you.

If Destruct-Type == Summer Tree Wall or Winter Tree Wall or Village Tree Wall..
//It's a tree! See what damage we shall deal
if (ItemCarried by hero of type Axe != no item)
Deal huge damage
else if (ItemCarried by hero of type Shovel!= no item)
Deal medium Damage
else if (ItemCarried by hero of type Pickaxe!= no item)
Deal medium damage

If Destruct-Type == Rock Small or Rock Large.
//It's a rock! See what damage we shall deal
if (ItemCarried by hero of type Axe != no item)
Deal low damage
else if (ItemCarried by hero of type Shovel!= no item)
Deal low Damage
else if (ItemCarried by hero of type Pickaxe!= no item)
Deal Huge damage

Psuedo code ftw!
 
Level 6
Joined
May 13, 2013
Messages
111
Either you use GreeN!X's system and use units instead of destructibles. You can then choose to either use an armor system, or use unit-specifications to deal more damage (Undead, Tauren, Mechanical, Ancient etc).

If you still want to use destrictubles, you have the fun way of using triggers for the damage, and then use If then else cases:

This happens when a destruct is either attacked or an ability is used on them, it's up to you.

If Destruct-Type == Summer Tree Wall or Winter Tree Wall or Village Tree Wall..
//It's a tree! See what damage we shall deal
if (ItemCarried by hero of type Axe != no item)
Deal huge damage
else if (ItemCarried by hero of type Shovel!= no item)
Deal medium Damage
else if (ItemCarried by hero of type Pickaxe!= no item)
Deal medium damage

If Destruct-Type == Rock Small or Rock Large.
//It's a rock! See what damage we shall deal
if (ItemCarried by hero of type Axe != no item)
Deal low damage
else if (ItemCarried by hero of type Shovel!= no item)
Deal low Damage
else if (ItemCarried by hero of type Pickaxe!= no item)
Deal Huge damage

Psuedo code ftw!

Can you show me an example trigger of it?
 
Status
Not open for further replies.
Top