How to understand this command 'AlterArmor'?

Interesting mapping tools and mapping help.

How to understand this command 'AlterArmor'?

Postby Ghoustaq » 15 May 2018, 18:31

AlterArmor
INFO: Unit:AlterArmor(damageTypeName, multiplier)


The code is copied from http://supcom.wikia.com/


such as Unit:AlterArmor('Normal', 0.5) , does it mean the unit will just get half of the damage if the type of the damage is Normal?

why is this command related with 'damageTypeName' instead of 'armorTypeName' ?
User avatar
Ghoustaq
Avatar-of-War
 
Posts: 65
Joined: 25 Dec 2017, 13:54
Has liked: 10 times
Been liked: 0 time
FAF User Name: Ghoustaq

Re: How to understand this command 'AlterArmor'?

Postby speed2 » 15 May 2018, 20:19

Ghoustaq wrote:
why is this command related with 'damageTypeName' instead of 'armorTypeName' ?

maybe it isnt, this "documentation" is more than poor, it would not be the first thing that would be wrong. Either find some code that uses it or experiment with it to find out what it does. That's the only way.
User avatar
speed2
Supreme Commander
 
Posts: 2958
Joined: 05 Jan 2013, 15:11
Has liked: 530 times
Been liked: 997 times
FAF User Name: speed2

Re: How to understand this command 'AlterArmor'?

Postby Uveso » 16 May 2018, 16:50

I guess it's a typo, this should be right:
Code: Select all
AlterArmor(armorTypeName, multiplier)


But i don't know how it works, its also not present in the original programmcode.
Maybe a deprecated/forgotten command from SupCom vanilla.
User avatar
Uveso
Supreme Commander
 
Posts: 1144
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 39 times
Been liked: 167 times
FAF User Name: Uveso

Re: How to understand this command 'AlterArmor'?

Postby Ghoustaq » 16 May 2018, 17:42

speed2 wrote:
Ghoustaq wrote:
why is this command related with 'damageTypeName' instead of 'armorTypeName' ?

maybe it isnt, this "documentation" is more than poor, it would not be the first thing that would be wrong. Either find some code that uses it or experiment with it to find out what it does. That's the only way.


Yes, I tested it just now. the multiplier does effect the value of damage which a unit suffers from another.it doesn't matter that 'Normal' is the value of 'damageType' or 'armorType' ,'cause they are both normal in most cases.
User avatar
Ghoustaq
Avatar-of-War
 
Posts: 65
Joined: 25 Dec 2017, 13:54
Has liked: 10 times
Been liked: 0 time
FAF User Name: Ghoustaq


Return to Mapping

Who is online

Users browsing this forum: Deribus and 1 guest

cron