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

Changing damage type ability

Status
Not open for further replies.
Level 13
Joined
Mar 13, 2010
Messages
1,172
I need help with changing a heros damage type from hero damage, to chaos damage. And it needs to take effect after the hero learns the skill, so its like a passive move. I've tryed doing this with triggers but I failed.

Any help will be greatly appresiated, and rewarded :)
 
Level 9
Joined
Oct 11, 2009
Messages
477
When the skill is learned, replace the hero with another unit-type of hero which has a chaos damage type and add a masking effect to hide the unit replacement. Just make it sure to store data from the previous hero to make it look that it changed its damage type and not the whole hero. Aside from that I have no more ideas about changing damage type for a unit in-game.

Note: The data includes life, mana, level, skill(s) level, experience, etc..
 
Level 13
Joined
Mar 13, 2010
Messages
1,172
Good idea, but I'm not too great with triggers; so I don't really think I know how to do that by myself. (storing the info from the hero) But maybe if you could post the triggers, or give me an example?
 
Level 9
Joined
Oct 11, 2009
Messages
477
First, you need 2 heroes, one with a hero damage and with a chaos damage. Your custom hero specially.

Second, create a trigger like this:
  • Chaos damage
    • Events
      • //Your event(skill learned)
    • Conditions
      • //Your conditions
    • Actions
      • //Create masking effect here to hide hero replacement(special effects or whatever)
      • Set LifeData = Current life of (Triggering unit)
      • Set ManaData = Current mana of (Triggering unit)
      • Set LevelData = Hero level of (Triggering unit)
      • Set AngleData = Facing angle of (Triggering unit)
      • Set PointData = Position of (Triggering unit)
      • Unit - Remove (Triggering unit)
      • Unit - Create 1 (Chaos damage hero) at PointData facing AngleData
      • Custom script: call RemoveLocation(udg_PointData)
      • Unit - Set life of (Last created unit) to LifeData
      • Unit - Set mana of (Last created unit) to ManaData
      • Hero - Set hero level of (Last created unit) to LevelData, hide level up graphics
Note: LifeData, ManaData, AngleData are reals. PointData is a point, while LevelData is an integer. Just make it sure that your masking effect time is greater than 1.75 second(s). Its leak-free.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Second, create a trigger like this:
  • Chaos damage
    • Events
      • //Your event(skill learned)
    • Conditions
      • //Your conditions
    • Actions
      • //Create masking effect here to hide hero replacement(special effects or whatever)
      • Set LifeData = Current life of (Triggering unit)
      • Set ManaData = Current mana of (Triggering unit)
      • Set LevelData = Hero level of (Triggering unit)
      • Set AngleData = Facing angle of (Triggering unit)
      • Set PointData = Position of (Triggering unit)
      • Unit - Remove (Triggering unit)
      • Unit - Create 1 (Chaos damage hero) at PointData facing AngleData
      • Custom script: call RemoveLocation(udg_PointData)
      • Unit - Set life of (Last created unit) to LifeData
      • Unit - Set mana of (Last created unit) to ManaData
      • Hero - Set hero level of (Last created unit) to LevelData, hide level up graphics

You could just use Unit - Replace unit :)
 
Level 9
Joined
Oct 11, 2009
Messages
477
Oh... Sorry, I already forgot that function because my Warcraft III got deleted on my PC 4 months ago. I haven't gone to map making in the past few months.
 
Level 8
Joined
Apr 8, 2009
Messages
499
If you give the hero 2 attack types. There is an ability that enables one and can disable the other. I forgot what it was, but I can try to look for you.

tbh, i think this guys idea was actually the best.
use a orb item ability (orb of fire/orb of frost/orb of whatever), change it to unit ability, set damage bonus to 0, set it to disable attack 1 and enable attack 2.
 
Status
Not open for further replies.
Top