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 The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top