PDA

View Full Version : Cat's Psych attack?!


chenlimin
14-02-2009, 16:13
Cat seem able to stun and damage even when he is halt due to obstacle, he did stop jumping but he still stun plus damage.

Aixu
15-02-2009, 18:30
You mean pounce?
It's probably because the dummy spell damages and stuns..
Which would mean it's most likely a Storm Bolt.
So the 'leap' is canceled but the storm bolt still triggered.

Steelb_l_ade
16-02-2009, 19:53
That's correct, its a problem i ahvent been able to solve.

Aixu
16-02-2009, 22:36
You could try making a dummy spell that deals 0 dmg and no stun, then when that one's activated make the Pounce, and when it's finished cast another Storm Bolt with 50 range or something (close up). Meaning that if the Pounce is canceled the other spell won't be cast

chenlimin
17-02-2009, 14:47
After a few hour of pain, I made the spell (using data from hero page). But I wasn't sure about the speed of the jump, if ROTG's pounce is in GUI, and Steelb_l_ade would let me look at it, I think I can set the speed right.

Link Removed Due to update.

Btw, the variables are pretty mass up, but I got all the leaks. And if anyone found bugs, info me, I can patch them up.

Credit goes to "Im_On_56k" for making a leak checker, save me lots of time.

Steelb_l_ade
19-02-2009, 20:07
Okay guys since youve shown an intrest the pounce spell is Jass,
it refers to another Gui spell, sinc eim not very good at jass, perhaps you can see where the issues in the code is.
The code for the pounce power follows below:

function RawPSSJ takes nothing returns integer
return 'A07G' //Raw code for Pounce
endfunction
//================================================== ===============================
//Configuration
function ss_pounceconstant takes nothing returns real
return 7.00 //Set this real number higher to get faster speed, and lower to get slower speed
endfunction
//================================================== ===============================
function Trig_Pounce_Conditions takes nothing returns boolean
return GetSpellAbilityId() == RawPSSJ()
endfunction
function PounceSS takes nothing returns nothing
local unit spell_pouncecaster = RetrieveUnit(GetExpiredTimer(), "spell_pouncecaster")
local real spell_pouncess_const = GetStoredReal(Cache(),I2S(HandToInt(GetExpiredTime r())),"spell_pouncess_const")
local real spell_pouncefaceangle = GetStoredReal(Cache(),I2S(HandToInt(GetExpiredTime r())),"spell_pouncefaceangle")
local location pouncecastloc = GetUnitLoc(spell_pouncecaster)
local location pouncepolarproj = PolarProjectionBJ(pouncecastloc, ( spell_pouncess_const * 5.00 ), ( spell_pouncefaceangle + 180.00 )) //else goes backwards
local effect spell_pouncedusteffect
call SetUnitPositionLocFacingBJ( spell_pouncecaster, pouncepolarproj, ( spell_pouncefaceangle - 180.00 ) )
set spell_pouncedusteffect = AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\Ancie ntProtectorMissile.mdl",spell_pouncecaster,"origin")
call DestroyEffectBJ( spell_pouncedusteffect )
call RemoveLocation(pouncecastloc)
call RemoveLocation(pouncepolarproj)
set spell_pouncecaster = null
set pouncecastloc = null
set pouncepolarproj = null
set spell_pouncedusteffect = null
endfunction
function Trig_Pounce_Actions takes nothing returns nothing
local real spell_pouncess_const = ss_pounceconstant()
local unit spell_pouncecaster = GetTriggerUnit()
local location pouncecastloc = GetUnitLoc(spell_pouncecaster)
local location spell_pouncetarget = GetUnitLoc(GetSpellTargetUnit())
local real spell_pouncefaceangle = AngleBetweenPoints(pouncecastloc, spell_pouncetarget) + 180.00
local real spell_distancepounce = DistanceBetweenPoints(pouncecastloc, spell_pouncetarget)
local timer spell_pouncetimer = CreateTimer()
if ( spell_distancepounce > 500 ) then
set spell_distancepounce = 500
endif
// call SetUnitPathing( spell_pouncecaster, false ) //collision off
// call UnitAddAbility(spell_pouncecaster, RawEvade())
call SetUnitAnimation( spell_pouncecaster, "ready" )
call StoreHandle(spell_pouncetimer, spell_pouncecaster, "spell_pouncecaster")
call StoreReal(Cache(),I2S(HandToInt( spell_pouncetimer )),"spell_pouncess_const",spell_pouncess_const)
call StoreReal(Cache(),I2S(HandToInt( spell_pouncetimer )),"spell_pouncefaceangle",spell_pouncefaceangle)
call TimerStart(spell_pouncetimer, 0.03, true, function PounceSS)

call TriggerSleepAction( ( spell_distancepounce / ( spell_pouncess_const * 200.00 ) ) )
// call UnitRemoveAbility( spell_pouncecaster, RawEvade())
call ResetUnitAnimation( spell_pouncecaster )
// call SetUnitPathing( spell_pouncecaster, true ) //collision on
call Flush(spell_pouncetimer)
call DestroyTimer(spell_pouncetimer)
call RemoveLocation(pouncecastloc)
call RemoveLocation(spell_pouncetarget)
set pouncecastloc = null
set spell_pouncetarget = null
set spell_pouncecaster = null
set spell_pouncetimer = null
endfunction
//================================================== =========================
function InitTrig_Pounce_JASS takes nothing returns nothing
set gg_trg_Pounce_JASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pounce_JASS, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Pounce_JASS, Condition( function Trig_Pounce_Conditions ) )
call TriggerAddAction( gg_trg_Pounce_JASS, function Trig_Pounce_Actions )
endfunction

chenlimin
26-02-2009, 11:16
Updated: http://www.hiveworkshop.com/forums/pastebin.php?id=tor2ix

It should be the same speed as the one in the map now. It still isn't MUI, but there's only a max of a cat in the map anyway.