Spell Ice Trap

WolfieeifloW

WEHZ Helper
Reaction score
372
You don't need to bump approved resources BRUTAL :p .
Unless you make an update or something of the like ;) !
 

LiveSsenkrad

Member
Reaction score
3
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.
 

Rushhour

New Member
Reaction score
46
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?
 
Reaction score
341
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?

Save the map first, then hit testmap.
 

BRUTAL

I'm working
Reaction score
118
Updated.
Now requires GT and KT2; all included in the map.
Made code shorter and more efficient.
Fixed the stupid bug that was pointed out.
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.
 

Azlier

Old World Ghost
Reaction score
461
Recycling dummy units would make your spell even more efficient.
 

Azlier

Old World Ghost
Reaction score
461
Well, a struct with a dummy inside works just fine. When the struct is created, check if the dummy is null or not. If so, create a new dummy.

Instead of removing dummies, you should 'release' them. Which means hiding them or something.
 

SanKakU

Member
Reaction score
21
great spell. got a bump for you.
unit apply timed life did not work so well. i edited the spell to include the dummy unit in the struct. it is unit .a instead of local unit u. it's also different in other ways...but that's the main part of the spell that probably ought to be updated. you could ignore my customization of preventing blinking out of the circle.
JASS:
// 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)&gt;=DISTANCE then
call SetUnitX(data.target,data.x)
call SetUnitY(data.target,data.y)
endif
set data.ticks=data.ticks-1
if data.ticks&lt;=0 then  
call data.end()
return true
else
if data.ticks&gt;=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>
 

NeuroToxin

New Member
Reaction score
46
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.
 

SanKakU

Member
Reaction score
21
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.

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.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top