Spell War Barrage

Magoiche

Member
Reaction score
20
War Barrage v1.1
by Magoiche



GUI/JASS: vJASS
MUI/MPI: MUI and MPI
Leakless?: Yep
Lagless?: Yep
Requirements: NewGen and PolledWait2(Inside the Map)
Import Difficult: Medium

Description: Using his amazing skills of nanotechnology the caster create a etheral indestructable tank in 0.25 seconds. The casters enters the tank and start sending waves of powerfull rockets doing damage in an AoE every 0.20 seconds and stuning enemies for 1 second.

Level 1 - 20 Damage and 175 AoE.
Level 2 - 30 Damage and 200 AoE.
Level 3 - 40 Damage and 225 AoE.
Level 4 - 50 Damage and 250 AoE.


Screenshots:
warbarragexe0.png

Code:
JASS:

//////////////////////////////////////////////
////             War Barrage              ////
////          by Magoiche Saika           ////
//////////////////////////////////////////////
////NOTE: Everything that you can't change////
////       in this script you can in the  ////
////              Object Editor.          ////
//////////////////////////////////////////////

scope WarBarrage initializer Initial

globals
    private constant integer WarBarrageSpellRawData = 'A000'
    // Raw Data of the War Barrage spell
    private constant integer WarBarrageTankDummyRawData = 'u000'
    // Raw Data of the Tank Dummy that will apear in the place of the caster
    private constant integer RocketsSpellRawData = 'A001'
    // Raw Data of the Rockets spell
    private constant integer WarBarrageDummyRawData = 'u001'
    // Raw Data of the Dummy
    private constant integer WarBarrageNumberOfWavesPerLevel = 2
    // Number of waves per level Ex: Lvl-1: 2 Lvl-2: 4... 
    private constant real WarBarrageTimeBetweenWaves = 0.25
    // Time between each wave
    private constant real WarBarrageDistanceOfWaves = 150
    // Distance between each wave
    private constant real WarBarrageDummyTimedLife = 3
    // The time the Dummy will live. Put it something more than the Effect Duration for the Rockets Spell
    private constant string RocketsOrderString = "clusterrockets"
    // Rockets Use/Turn On Order Id
    private constant integer WarBarrageTankDummyRedVertexColor = 255
    // Red Vertex Color for the Tank. Max 255 Min 0
    private constant integer WarBarrageTankDummyGreenVertexColor = 255
    // Green Vertex Color for the Tank. Max 255 Min 0
    private constant integer WarBarrageTankDummyBlueVertexColor = 255
    // Blue Vertex Color for the Tank. Max 255 Min 0
    private constant integer WarBarrageTankDummyTrasnparency = 190
    // Transparency for the Tank. Max 255 Min 0
    private constant real WarBarrageDestroyTreeAoE = 250
    // AoE that each wave will kill trees. Put 0 and trees won't be destroyed.
    private constant string WarBarrageEnterTankSpecialEffect = "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl"
    // Effect that apears when the caster enters the tank
endglobals

private function PolledWait2 takes real Duration returns nothing
    local real TimeRemaining
    local real st = TimerGetElapsed( bj_gameStartedTimer )
    if st <= 0 then
        set bj_gameStartedTimer = CreateTimer()
        call TimerStart( bj_gameStartedTimer, 1000000, false, null )
    endif
    if Duration > 0 then
        loop
            set TimeRemaining = Duration - TimerGetElapsed( bj_gameStartedTimer ) + st
            exitwhen TimeRemaining <= 0
            if ( TimeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD ) then
                call TriggerSleepAction( 0.1 * TimeRemaining )
            else
                call TriggerSleepAction( bj_POLLED_WAIT_INTERVAL )
            endif
        endloop
    endif
endfunction

private function EnumDestructablesInCircle2 takes real radius, location loc, code actionFunc returns nothing
    local rect r
    local real centerX = GetLocationX( loc )
    local real centerY = GetLocationY( loc )
    if radius > 0 then
    set bj_enumDestructableCenter = loc
    set bj_enumDestructableRadius = radius
    set r = Rect( centerX - radius, centerY - radius, centerX + radius, centerY + radius )
    call EnumDestructablesInRect( r, filterEnumDestructablesInCircleBJ, actionFunc )
    call RemoveRect( r )
    endif
    set r = null
endfunction

private function KillTrees takes nothing returns nothing
    call KillDestructable( GetEnumDestructable() )
endfunction

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == WarBarrageSpellRawData
endfunction

private function Actions takes nothing returns nothing
    local integer LoopAIndex = 0
    local real WaveDistance = WarBarrageDistanceOfWaves
    local unit Caster = GetTriggerUnit()
    local real CasterFacing = GetUnitFacing( Caster )
    local real x = GetUnitX( Caster )
    local real y = GetUnitY( Caster )
    local unit Dummy = CreateUnit( GetOwningPlayer( Caster ), WarBarrageTankDummyRawData, x, y, CasterFacing )
    local real CastX
    local real CastY
    local location CastLoc
    local integer NumberOfWaves = WarBarrageNumberOfWavesPerLevel * GetUnitAbilityLevel( Caster, WarBarrageSpellRawData )
    call SetUnitPathing( Caster, false )
    call DestroyEffect( AddSpecialEffect( WarBarrageEnterTankSpecialEffect, x, y ) )
    call SetUnitPosition( Dummy, x, y )
    call ShowUnit( Caster, false )
    call SelectUnit( Caster, false )
    call SetUnitVertexColor( Dummy, WarBarrageTankDummyRedVertexColor, WarBarrageTankDummyGreenVertexColor, WarBarrageTankDummyBlueVertexColor, WarBarrageTankDummyTrasnparency )
    call UnitApplyTimedLife( Dummy, 'BFTL', ( NumberOfWaves * WarBarrageTimeBetweenWaves ) + WarBarrageDummyTimedLife )
    set x = x + 50 * Cos( CasterFacing * 0.017 )
    set y = y + 50 * Sin( CasterFacing * 0.017 )
    loop
        exitwhen LoopAIndex >= NumberOfWaves
        set Dummy =  CreateUnit( GetOwningPlayer( Caster ), WarBarrageDummyRawData, x, y, CasterFacing )
        set CastX = x + WaveDistance * Cos( CasterFacing * 0.017 )
        set CastY = y + WaveDistance * Sin( CasterFacing * 0.017 )
        set CastLoc = Location( CastX, CastY )
        call UnitApplyTimedLife( Dummy, 'BFTL', WarBarrageDummyTimedLife )
        call UnitAddAbility( Dummy, RocketsSpellRawData )
        call SetUnitAbilityLevel( Dummy,  RocketsSpellRawData, GetUnitAbilityLevel( Caster, WarBarrageSpellRawData ) )
        call IssuePointOrder( Dummy, RocketsOrderString, CastX, CastY )
        call PolledWait2( WarBarrageTimeBetweenWaves )
        call EnumDestructablesInCircle2( WarBarrageDestroyTreeAoE, CastLoc, function KillTrees )
        set LoopAIndex = LoopAIndex + 1
        set WaveDistance = WaveDistance + WarBarrageDistanceOfWaves
    endloop
    call PolledWait2( WarBarrageDummyTimedLife - ( 1.35 * WarBarrageTimeBetweenWaves ) )
    call SetUnitPosition( Caster, x, y )
    call ShowUnit( Caster, true )
    call SetUnitPathing( Caster, true )
    call SelectUnit( Caster, true )
    call RemoveLocation( CastLoc )
    set CastLoc = null
    set Caster = null
    set Dummy = null
endfunction

private function Initial takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
    set trig = null
endfunction

endscope



Credits
- Vexorian for the PolledWait2


Changelog
v1.0 - Created and Submited the Spellpack
v1.1 - Fixed the Dummy position. Thanks to Trollvottel

Instructions of how to import inside the map!​
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Code looks good.
Looks good from the screenie too.
Although I think you maybe got a little missile SFX happy ;) :p .
Good nonetheless.

EDIT: Maybe you could link the "NewGen" text to the NewGen Thread?
 

D.V.D

Make a wish
Reaction score
73
Looks like a spammed rocket barrage. Eh, just my opinion.

/D.V.D
/http://gamezonezelda.blogspot.com
 

Magoiche

Member
Reaction score
20
@Wolfie

I don't get the SFX part. i.i
Add the link. Thanks =P

@DVD

Its is like you said.
But with the part you can't die because you are in a indestructable tank.
And its a line of rockets.

Anyway i apreciate your comments.

+rep both
 

BlackRose

Forum User
Reaction score
239
War Barrage looks cool, and fun.

People need to make more spells with a lot of eyecandy stuff, or things that grab attention.

+REP.
 

Magoiche

Member
Reaction score
20
Thanks for the comment. +rep

Yeah. Eyecandyness of 1337 doom pwns all i.i


Any more suggestion or comment?

I am waiting them =P
 

Trollvottel

never aging title
Reaction score
262
the missiles dont seem to be fired by the tank but to come from inside it. so please change the starting point of the missiles a bit.
 

Magoiche

Member
Reaction score
20
Thanks for the comments! +rep

@Trollvottel

Fixed. Thanks for notcing it. ^^


Added v1.1

- Fixed Dummy Position. thanks to Trollvottel
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top