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

Unit Attack/Armor Type Changing

Status
Not open for further replies.
Hey, is there any way to change a unit's Attack or Armor type ingame, with triggers?
An easy, cheap, way to do it for attack type and only to cycle among 2 attack types:
Orb of shadow ability - add and remove it.
It simply allows the unit to use its 2nd attack, and it can even be used to swap among ranges.
Cons:
1) No need for milion unit types.
2) Allows to dominate attack type and attack range, and even attack damage and attack cooldown.
Not So Cons: (negetive cons? or however its named)
1) only allows cyceling among 2 attack types
2) wont allow to dominate armor

It might help for centain maps or cases so I posted it anyways
 
I've run to exactly same problem as you MaTiJa and in the end I gave up. Now the game I wanted to have this function only uses 1 Attack and Armor Type. And it is fine, as the game is a RPG. What type of project you're working on?


It's for a project of my older brother. I don't know really, I guess it's some sort of RPG.



Anyway, thanks for all the feedback, +rep for everyone :D
 
I tried to go the bear form way, but when I morph, all my spells in my spellbook are removed. How come?

Spell book does not stay on unit morphing, in addition, spell book who is on both the models's abilities will still lose all the spells inside the book, not only their levels but the abilities to begin with, each and any of them.
Do to this bug, I get morphed heroes a second hero which is built on game start and swap among them, however, I can't see how this can be done with normal units who have no real dummy unit on game start.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Spell book does not stay on unit morphing, in addition, spell book who is on both the models's abilities will still lose all the spells inside the book, not only their levels but the abilities to begin with, each and any of them.

You can keep them with this:
  • // A000 = spell book
  • Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'A000')
  • // AEer = spell book ability 1
  • Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'AEer')
 
You can keep them with this:
  • // A000 = spell book
  • Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'A000')
  • // AEer = spell book ability 1
  • Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'AEer')

Im gonna check this:
APPROVED, but just to make things easier to dodge miss read of minor L and high I that
are looking the same in the editor: Set ability= abilityyouwant
Custom script: call UnitMakeAbilityPermanent(udg_u, true, udg_ability)
as I said before :D APPROVED! +rep
 
Last edited:
Yeah Maker it works thanks but I need to detect the player number of the owner of triggering unit. How do I do it with Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'A000')?
* varibles are marked with capital last letteR

Set abilitY = anablitywith13levels,each level means player number
set uniT = casting unit
set integeR= player number of (owner of triggering unit)
add ^ abilitY to unit
costum script make ability permanent (udg_uniT, true, udg_ability)
set level of abilitY to integeR for uniT

now when ever you need to know the unit owner

Set abilitY = anablitywith13levels,each level means player number
set uniT = the unit you want to check
set integeR= level of abilitY for uniT

^ approved way to know owner of unit, even it used bear form or
another types of transformation

Editor note: this is the best way to form a timed charm, but make sure that the
unit become unable to be charmed afterwards or else the unit will need to swap owner
without resetting the skill level, hence going back to its most old owner, and just
reset its timer for the new owner.
 
like in another thread i already said, the most easiest way is with damage detection system, your store to a variable the unit armor type or attacker unit attack type then calculate the output damage depend on armor/defence variable

Funny Fact: There is an upgrade for orc towers that permenantly
turns any armor into fortified.
But this is only one way arround, into fotified , not backward.
 
Status
Not open for further replies.
Top