BRUTAL
I'm working
- Reaction score
- 118
bump, any suggestions/comments?
wth?Also if any heroes is added to the map the JASS triggers refuses to work, thus disabling the spell.
Save the map first, then hit testmap.I would like to test the spell, but neither the gui version nor the vjass works
I do have jassnewgenpack, all my other maps can be tested and all, just these two not ! :banghead:
When I hit testmap I get to the startscreen, anyone knows a solution?
A simple bug where if you cast 2 of them at the same spot at different times, you will end up with the 2nd one not being a ice trap, you can then walk right through it.
// Ice Trap by BRUTAL.
// Requires GT, and KT2.
// Credits are welcome but not necessary.
// October 12th 2009.
//
// Modified to be Fire Barrier for Valkyrie Hero by SanKakU
// My memories are a little fuzzy of the Xena episodes but
// from what i remember, Odin's top blonde valkyrie cursed
// Gabrielle by putting her in a fire trap much like this one.
// In further research it can be found that in the tv show
// Bleach, the Captain Commander Yamamoto uses an ability
// like this.
//
// the spell now enables countering of escape spells.
scope FireBarrier initializer I
define{private ID='A08A';private IMMO_ID='A08B';private DUMMY_ID='h01B';;private PATH_BLOCK='YTpb'
private PERIOD=.04;private SCALE=1. ;private ALPHA=75 ;private MAX_UNITS=36;private DISTANCE=350.}
private struct Data;unit caster, target;real x, y;real angle;integer pbInt=0, ticks, maxTicks
destructable array pathBlock[MAX_UNITS];unit array a[MAX_UNITS]
static method create takes unit u, real tx, real ty, unit z returns Data
local Data data=Data.allocate()
set data.caster=u
set data.target=z
set data.x=tx
set data.y=ty
set data.angle=GetUnitFacing(u)+140
set data.ticks=R2I(45*(GetUnitAbilityLevel(data.caster,ID))/PERIOD)+10
set data.maxTicks=data.ticks
return data
endmethod
method circle takes nothing returns nothing
integer level=GetUnitAbilityLevel(.caster,ID)
real dis=DISTANCE
//==AS AN ULTIMATE, THIS SPELL LASTS 45 SECONDS AT LEVEL 1, 90 SECONDS AT LEVEL 2, AND 135 SECONDS AT LEVEL 3
real x=.x+dis*Cos(.angle*bj_DEGTORAD)
real y=.y+dis*Sin(.angle*bj_DEGTORAD)
unit .a[.pbInt]=CreateUnit(GetOwningPlayer(.caster),DUMMY_ID,x,y,bj_RADTODEG*Atan2(y-.y,x-.x))
call SetUnitScale(.a[pbInt],SCALE,SCALE,SCALE)
call SetUnitVertexColor(.a[pbInt],255,255,255,R2I(2.55*ALPHA))
call UnitAddAbility(.a[pbInt],IMMO_ID)
call SetUnitAbilityLevel(.a[pbInt],IMMO_ID,level)
call IssueImmediateOrder(.a[pbInt],"immolation")
set .angle=.angle+360./MAX_UNITS
set .pathBlock[.pbInt]=CreateDestructable(PATH_BLOCK,x,y,0,1,0)
set .pbInt=.pbInt+1
endmethod
method end takes nothing returns nothing
integer i=0;whilenot(i++==MAX_UNITS){RemoveUnit(.a<i>);KillDestructable(.pathBlock<i>)};endmethod
endstruct
private function PeriodicFunc takes nothing returns boolean
local Data data=KT_GetData()
if getdisr(data.x,data.y,data.target)>=DISTANCE then
call SetUnitX(data.target,data.x)
call SetUnitY(data.target,data.y)
endif
set data.ticks=data.ticks-1
if data.ticks<=0 then
call data.end()
return true
else
if data.ticks>=data.maxTicks-MAX_UNITS then
call data.circle()
endif
return false
endif
endfunction
private function actions takes nothing returns nothing
call KT_Add(function PeriodicFunc,Data.create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY(),GetSpellTargetUnit()),PERIOD)
endfunction
private function I takes nothing returns nothing
call TriggerAddAction(GT_RegisterStartsEffectEvent(CreateTrigger(),ID),function actions)
endfunction
endscope</i></i>
you are incorrect. unitapplytimedlife kills the unit. this allows the unit to show a death animation. we need to remove the unit if we are using certain alternative models for the dummy unit. this is elementary.You realize that, UnitApplyTimedLife works perfectly right? You're making it more difficult then it needs to be (No flaming on me intended, sorry if it comes off that way), but also, he didn't ask anyone to do this for him.