No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 29: Line 29:
!Hovercraft Units !!Primary Weapon String!! Secondary Weapon String
!Hovercraft Units !!Primary Weapon String!! Secondary Weapon String
|-
|-
|'''HOVERCRAFT'''||N/A||N/A
|'''HOVERCRAFT'''||WEAPON_HOVERCRAFT_GUN||WEAPON_HOVERCRAFT_MG
|-
|-
|'''ARTILLERYCRAFT'''||N/A||N/A
|'''ARTILLERYCRAFT'''||WEAPON_CANNON||N/A
|-
|-
|'''HOVERFLAK'''||N/A||N/A
|'''HOVERFLAK'''||WEAPON_HOVERVULCAN_CANNON||N/A
|-
|-
|'''HEAVY_HOVERCRAFT'''||N/A||N/A
|'''HEAVY_HOVERCRAFT'''||WEAPON_HEAVY_HOVERCRAFT_GUN||WEAPON_HEAVY_HOVERCRAFT_MG
|-
|-
|}
|}
Line 41: Line 41:
[[Category:Units]]
[[Category:Units]]
[[Category:UnitIDs]]
[[Category:UnitIDs]]
[[Category:Modding tutorials]]

Latest revision as of 22:19, 26 November 2023

Hovercraft Units' stats and properties can be modified as a whole, by using the GameEnums.UnitType_Hovercraft enumeration variable. For instance:

this.getOffensiveBonus = function (co, attacker, atkPosX, atkPosY,
    defender, defPosX, defPosY, isDefender, action, luckmode, map)
{
    if (co.getIsCO0() === true)
    {
        if (co.getPowerMode() === GameEnums.PowerMode_Power)
        {
            if (attacker.getUnitType() === GameEnums.UnitType_Hovercraft)
            {
                return 30;
            }
        }
    }
    return 0;
};

Increases the firepower of hovercraft units by 30% during the CO Power.

Modifying stats or properties of specific Units

Each unit can be modified through a comparison of the Unit ID. The Unit ID can be obtained through unit.getUnitID(), and it's of a string type.

Possible values are:

Hovercraft Units and their weapon strings
Hovercraft Units Primary Weapon String Secondary Weapon String
HOVERCRAFT WEAPON_HOVERCRAFT_GUN WEAPON_HOVERCRAFT_MG
ARTILLERYCRAFT WEAPON_CANNON N/A
HOVERFLAK WEAPON_HOVERVULCAN_CANNON N/A
HEAVY_HOVERCRAFT WEAPON_HEAVY_HOVERCRAFT_GUN WEAPON_HEAVY_HOVERCRAFT_MG