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

[JASS] need little help here.

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
Spell do only 100 dmg every time. Is it possible to make so it makes 100x level for example. Can some one help me make that code?

Here is the code now.

JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function BVCond takes nothing returns boolean
    return GetSpellAbilityId() == 'A0AS'
endfunction

function BVCast takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local unit u2 = GetSpellTargetUnit()
    local real a = Atan2(GetUnitY(u2)-GetUnitY(u), GetUnitX(u2)-GetUnitX(u))
    local real x = GetUnitX(u) + ((GetUnitX(u2) - GetUnitX(u)) - (60*Cos(a)))
    local real y = GetUnitY(u) + ((GetUnitY(u2) - GetUnitY(u)) - (60*Sin(a)))
    call UnitDamageTarget(u, u2, 100., false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
    call SetUnitX(u, x)
    call SetUnitY(u, y)
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl", u2, "chest"))
    set u = null
    set u2 = null
endfunction

//===========================================================================
function InitTrig_Blade_Void_JASS takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t, Condition( function BVCond))
    call TriggerAddAction(t, function BVCast)
    set t = null
endfunction
 
Level 19
Joined
Feb 15, 2008
Messages
2,184
so i remove whole line call unit damage etc?

JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function BVCond takes nothing returns boolean
    return GetSpellAbilityId() == 'A0AS'
endfunction

function BVCast takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local unit u2 = GetSpellTargetUnit()
    local real a = Atan2(GetUnitY(u2)-GetUnitY(u), GetUnitX(u2)-GetUnitX(u))
    local real x = GetUnitX(u) + ((GetUnitX(u2) - GetUnitX(u)) - (60*Cos(a)))
    local real y = GetUnitY(u) + ((GetUnitY(u2) - GetUnitY(u)) - (60*Sin(a)))
    call UnitDamageTarget(u, u2, GetUnitAbilityLevel(u,'A0AS') * 200., false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
    call SetUnitX(u, x)
    call SetUnitY(u, y)
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl", u2, "chest"))
    set u = null
    set u2 = null
endfunction

//===========================================================================
function InitTrig_Blade_Void_JASS takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t, Condition( function BVCond))
    call TriggerAddAction(t, function BVCast)
    set t = null
endfunction

Look like this now :)
 
Last edited:
Level 22
Joined
Nov 14, 2008
Messages
3,256
Attaching to the origin will look weird with that special effect, I don't want the blood effect at the feet of my units. Chest is fine.

Useless function with the action function, just make the condition function into an if that checks the spellabilityid and then you can just have the actions below and let the function always return false.

You could also make another function to calibrate the damage more easier.
 
Last edited:
Status
Not open for further replies.
Top