• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] which information i need to insert?

Status
Not open for further replies.
Level 6
Joined
Aug 4, 2012
Messages
193
native UnitDamagePoint takes unit whichUnit, real delay, real radius, real x, real y, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns boolean
 
  • unit whichUnit - Unit to deal the damage. For example, GetTriggerUnit(), which is (Triggering Unit) in GUI.
  • real delay - I'm not 100% on this, but I think it is just for if you want to delay the damage by a few seconds. Usually you will just put in 0
  • real radius - The radius of the area you want to damage. From the center point, the radius will extend out and make the function cover a particular circular area.
  • real x - The x-coordinate of the area you want to damage. (the x-coordinate of the center area)
  • real y - The y-coordinate of the area you want to damage. (the y-coordinate of the center area)
  • real amount - The amount of damage to deal.
  • boolean attack - iirc it will fire the attack event, but I could be wrong. Usually you will have it as true.
  • boolean ranged - probably just for some internal game damage handling or something, usually just set it to false
  • attacktype attackType - the type of attack to deal. Here is a list of them:
    http://wiki.thehelper.net/Attack_Type_Constants
  • damagetype damageType - the type of damage to deal. Here is a list of them:
    JASS:
        constant damagetype         DAMAGE_TYPE_UNKNOWN             = ConvertDamageType(0)
        constant damagetype         DAMAGE_TYPE_NORMAL              = ConvertDamageType(4)
        constant damagetype         DAMAGE_TYPE_ENHANCED            = ConvertDamageType(5)
        constant damagetype         DAMAGE_TYPE_FIRE                = ConvertDamageType(8)
        constant damagetype         DAMAGE_TYPE_COLD                = ConvertDamageType(9)
        constant damagetype         DAMAGE_TYPE_LIGHTNING           = ConvertDamageType(10)
        constant damagetype         DAMAGE_TYPE_POISON              = ConvertDamageType(11)
        constant damagetype         DAMAGE_TYPE_DISEASE             = ConvertDamageType(12)
        constant damagetype         DAMAGE_TYPE_DIVINE              = ConvertDamageType(13)
        constant damagetype         DAMAGE_TYPE_MAGIC               = ConvertDamageType(14)
        constant damagetype         DAMAGE_TYPE_SONIC               = ConvertDamageType(15)
        constant damagetype         DAMAGE_TYPE_ACID                = ConvertDamageType(16)
        constant damagetype         DAMAGE_TYPE_FORCE               = ConvertDamageType(17)
        constant damagetype         DAMAGE_TYPE_DEATH               = ConvertDamageType(18)
        constant damagetype         DAMAGE_TYPE_MIND                = ConvertDamageType(19)
        constant damagetype         DAMAGE_TYPE_PLANT               = ConvertDamageType(20)
        constant damagetype         DAMAGE_TYPE_DEFENSIVE           = ConvertDamageType(21)
        constant damagetype         DAMAGE_TYPE_DEMOLITION          = ConvertDamageType(22)
        constant damagetype         DAMAGE_TYPE_SLOW_POISON         = ConvertDamageType(23)
        constant damagetype         DAMAGE_TYPE_SPIRIT_LINK         = ConvertDamageType(24)
        constant damagetype         DAMAGE_TYPE_SHADOW_STRIKE       = ConvertDamageType(25)
        constant damagetype         DAMAGE_TYPE_UNIVERSAL           = ConvertDamageType(26)
  • weapontype weaponType - here is a list of them:
    JASS:
        constant weapontype         WEAPON_TYPE_WHOKNOWS            = ConvertWeaponType(0)
        constant weapontype         WEAPON_TYPE_METAL_LIGHT_CHOP    = ConvertWeaponType(1)
        constant weapontype         WEAPON_TYPE_METAL_MEDIUM_CHOP   = ConvertWeaponType(2)
        constant weapontype         WEAPON_TYPE_METAL_HEAVY_CHOP    = ConvertWeaponType(3)
        constant weapontype         WEAPON_TYPE_METAL_LIGHT_SLICE   = ConvertWeaponType(4)
        constant weapontype         WEAPON_TYPE_METAL_MEDIUM_SLICE  = ConvertWeaponType(5)
        constant weapontype         WEAPON_TYPE_METAL_HEAVY_SLICE   = ConvertWeaponType(6)
        constant weapontype         WEAPON_TYPE_METAL_MEDIUM_BASH   = ConvertWeaponType(7)
        constant weapontype         WEAPON_TYPE_METAL_HEAVY_BASH    = ConvertWeaponType(8)
        constant weapontype         WEAPON_TYPE_METAL_MEDIUM_STAB   = ConvertWeaponType(9)
        constant weapontype         WEAPON_TYPE_METAL_HEAVY_STAB    = ConvertWeaponType(10)
        constant weapontype         WEAPON_TYPE_WOOD_LIGHT_SLICE    = ConvertWeaponType(11)
        constant weapontype         WEAPON_TYPE_WOOD_MEDIUM_SLICE   = ConvertWeaponType(12)
        constant weapontype         WEAPON_TYPE_WOOD_HEAVY_SLICE    = ConvertWeaponType(13)
        constant weapontype         WEAPON_TYPE_WOOD_LIGHT_BASH     = ConvertWeaponType(14)
        constant weapontype         WEAPON_TYPE_WOOD_MEDIUM_BASH    = ConvertWeaponType(15)
        constant weapontype         WEAPON_TYPE_WOOD_HEAVY_BASH     = ConvertWeaponType(16)
        constant weapontype         WEAPON_TYPE_WOOD_LIGHT_STAB     = ConvertWeaponType(17)
        constant weapontype         WEAPON_TYPE_WOOD_MEDIUM_STAB    = ConvertWeaponType(18)
        constant weapontype         WEAPON_TYPE_CLAW_LIGHT_SLICE    = ConvertWeaponType(19)
        constant weapontype         WEAPON_TYPE_CLAW_MEDIUM_SLICE   = ConvertWeaponType(20)
        constant weapontype         WEAPON_TYPE_CLAW_HEAVY_SLICE    = ConvertWeaponType(21)
        constant weapontype         WEAPON_TYPE_AXE_MEDIUM_CHOP     = ConvertWeaponType(22)
        constant weapontype         WEAPON_TYPE_ROCK_HEAVY_BASH     = ConvertWeaponType(23)

The damage/attacktype is for immunities/armor/internal reductions or w/e. The weapon type handles the sound it makes.

Here is an example of them all together:
JASS:
call UnitDamagePoint(GetTriggerUnit(), 0, 500, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
That will have the triggering unit damage a point with 0 delay, a radius of 500, around his own x/y coordinates, for 300 damage. It will have a normal attack/damage type, and it will make no sound (that weaponType makes no noise, you can also just input null)

GL
 
Status
Not open for further replies.
Top