Warcraft III resources & community, 2003–2006 · archived

Help with Entropy Armor :?

8 posts
#1

Help with Entropy Armor :?

Yes I need some help with this spell Entropy Armor http://www.wc3sear.ch/index.php?p=Spells&ID=1029&sid=

It knocks back everything thats hits it, though I was going to try and use this in a map though EVERYTHING gets knocked back :/ including buildings. So I was wondering if anyone could help me and tell me how I could make it not knock back buildings.
#2
Place a condition check for movement speed = 0, or = structure...

The latter is a boolean I think.
#3
How would i do that? spells in jass so i dont really know how to do it :/
#4
Please post all the code used by this spell.
Only then I could help you.

So, post or dy.
#5
Ok its 2 triggers, then a script in the custom aera script

Trigger
Entropy Armor On-

Evenets-
Unit is issused a order with no target

Condtions-
(level of entropy armor(ordered unit)) greater then or equal to 1

(issued order) equal to (order(manashieldon))

Events
Custom Scirpt- local trigger tChild = CreateTrigger()

Custom Scirpt- call SetUnitUserData(GetOrderedUnit(), T2I(tChild))

Custom Scirpt- call TriggerRegisterUnitEvent(tChild, GetOrderedUnit(), EVENT_UNIT_DAMAGED)

Custom Scirpt- call TriggerAddCondition(tChild, Condition(function Conditions_EntropyArmor))

Custom Scirpt- call TriggerAddAction(tChild, function Actions_EntropyArmor)

Custom Scirpt- set tChild = null



Ok so thats the first trigger ^  heres the secound one


Trigger
Entropy Armor Off-

Evenets-
Unit is issused a order with no target

Condtions-
(level of entropy armor(ordered unit)) greater then or equal to 1

(issued order) equal to (order(manashieldoff))


Events-

Custom Scirpt- call DestroyTrigger(I2T(GetUnitUserData(GetOrderedUnit())))


Ok so thats the secound trigger  then theres the aera i think its called the custim scirpt aera, when you click the map name in the trogger editor, its there.

Custom Script Code-

function T2I takes trigger tHandle returns integer
    return tHandle
    return 0
endfunction

function I2T takes integer iPointer returns trigger
    return iPointer
    return null
endfunction

function Conditions_EntropyArmor takes nothing returns boolean
    return (UnitHasBuffBJ(GetTriggerUnit(), 'B001') and (GetUnitAbilityLevelSwapped('A016', GetTriggerUnit()) >= 1))
endfunction

function Actions_EntropyArmor takes nothing returns nothing
    local location EntropyAttacker = GetUnitLoc(GetEventDamageSource())
    local location EntropyAttacked = GetUnitLoc(GetTriggerUnit())
    local real EntropyDistance = DistanceBetweenPoints(EntropyAttacker, EntropyAttacked) + 100.0 + (I2R(GetUnitAbilityLevelSwapped('A016', GetTriggerUnit())) * 50.0)
    local real EntropyAngle = AngleBetweenPoints(EntropyAttacked, EntropyAttacker)
    local location EntropyPolar = PolarProjectionBJ(EntropyAttacked, EntropyDistance, EntropyAngle)
    call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin", GetEventDamageSource(), "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl"))
    call DestroyEffect(AddSpecialEffectTargetUnitBJ("overhead", GetTriggerUnit(), "Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdl"))
    call SetUnitPositionLoc(GetEventDamageSource(), EntropyPolar)
    if GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) <= 0.00 then
        call RemoveLocation(EntropyAttacked)
        call RemoveLocation(EntropyAttacker)
        call RemoveLocation(EntropyPolar)
        set EntropyAttacked = null
        set EntropyAttacker = null
        set EntropyPolar = null
        call DestroyTrigger(GetTriggeringTrigger())
    else
        call RemoveLocation(EntropyAttacked)
        call RemoveLocation(EntropyAttacker)
        call RemoveLocation(EntropyPolar)
        set EntropyAttacked = null
        set EntropyAttacker = null
        set EntropyPolar = null
    endif
endfunction
#6
Give me 7 days time to opzimize it.
I'll send it to you via PM.
#7
ok thanks :P
#8
Here is the link to it:
Magic Shield
Has many new options like reflecting,absorbing,maxdamage and a few more.

Give me credits and alink to your map when it is submitted.

Thx.