• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Starcraft II Beta Key Spell Contest

Status
Not open for further replies.
Level 5
Joined
Aug 22, 2008
Messages
123
What complexity? Neither of your spells are complex.
Every tried ANY of them? I don't think so. Don't take position in a discussion that does not involve you. Trolling nr. 1.


Wait, so your spell was made before the competition?
The Tornado spell, yes. Trolling nr. 2.


It's not very hard to check pathing.
Trolling nr. 3.


What the hell is that supposed to mean? It sounds like you're just trying to measure your dick with his as if you're capable of divine complexities that he can't even fathom. Shut your face if you're just going to be a douche.
Trolling nr. 4.

If it honestly took you long enough for you to say "you have no idea how long I worked on it" then it took you way too long, so don't get too hasty on pretending you're better than everyone else.
Trolling nr. 5.

You have had your "fun". Now troll somewhere else.:hohum:
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Piranha89 said:
Every tried ANY of them? I don't think so. Don't take position in a discussion that does not involve you. Trolling nr. 1.

Yes, I've tried both of them, and neither of them are complex --which is exactly why I said it in the first place. There was nothing "fun" about watching your spell, either.

Second of all, if you're going to be a turd-stick on this forum then expect people to talk negatively towards you. I would have to be an idiot not to recognize your tantrum, and everybody else did as well, so I'm obviously not just trolling you.

Piranha89 said:
The Tornado spell, yes. Trolling nr. 2.

Do you even know what trolling is?

Piranha89 said:
It's not very hard to check pathing.
Trolling nr. 3.

Piranha89 said:
What the hell is that supposed to mean? It sounds like you're just trying to measure your dick with his as if you're capable of divine complexities that he can't even fathom. Shut your face if you're just going to be a douche.
Trolling nr. 4.

I'm curious, how exactly can a single post cause 5 instances of trolling. Clearly you're mentally defective, now I just feel bad for arguing with a retarded person.

elfian said:
Dude please stop, you are just continuing the flame war. Just, stop man! Everyone stop, we are here to compare our coding skills and spells not our dicks. >_>

Hey, that's my analogy! /jumpkick
 
Level 14
Joined
Jun 27, 2009
Messages
1,381
@Piranha : dude, this is a contest. If you're jealous about what someone did, no need to troll/flame him. It's you who started the whole thing. I am not saying you are jealous, but it could be a possibility. Also, if he made a spell that is 80 % yours, it is not yours.

@Witcher : Epic spell, man. I like the idea, and the effects.

@Garfield1337 : Very nice idea for the spell.

@Everyone : I wish you all luck.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
The poor zergs want to have cool spells, too!!! :mwahaha:
Imho this spell would fit to the Starcraft 2 theme perfectly

80795d1272638994-starcraft-ii-beta-key-spell-contest-screenshot.jpg


edit:
(it's 16.42 in germany right now on Friday the 30th of April and if the contest is over already just ignore the update)
added documentation and fixed a few minor things

edit2:
forgot to give credits
Credits to me for making this spell all alone with no third-party stuff/imported material or anything else and credits to TriggerHappy for making me happy with such a nice contest :)

edit3:
for some unknown reason the updated map didn't get attached at edit 1
also updated the tooltip now
 

Attachments

  • ColossalWorm. v0.1.w3x
    28.8 KB · Views: 66
  • screenshot.jpg
    screenshot.jpg
    104.8 KB · Views: 261
  • ColossalWorm. v0.2.w3x
    36.1 KB · Views: 53
Last edited:
Level 9
Joined
Aug 2, 2008
Messages
219
Hope i´m not too late now.
Here goes my submission:

icons_3173_btn.jpg
Power Pylon
The hero conjures a large amount of energy and transforms it into a immobile but powerful Pylon which generates a force field around it. Enemy units inside the force field will loose mana, when their mana is below 10 they start loosing HP. When casted again in range of another of your pylons the preveruis pylon gains range and lifetime. The loss of mana and hp and the duration and area of effect incrase per level.

Level 1Level 2Level3

Range: 240
Range: 330Range: 420

Duration: 13 Sec
Duration: 16 SecDuration: 19 Sec

Credits...
...to Vexorian for Table.
...to killst4r for the Pyolon Model.
...to General Frank for the Pylon Icon.

I was in a hurry so the test inviorment is veeerrrryyyy plain i´ll improve some bits and pieces tomorrow if possible.
 

Attachments

  • power_pylon.w3x
    213.1 KB · Views: 80
Last edited:
Level 23
Joined
Nov 29, 2006
Messages
2,482
Guys, consider it. So you might have gotten the concept of your both spells very similar. Merly, this only will tell you that your idea is not the very best unique designed one, if poeple tend to come up with ideas which is all the same. Nevertheless it wont ruin anything for anyone else, only for yourself. Its tough to blaim each other. Maybe you should reconsider that you did just happend to think the same way.
 
Level 5
Joined
Apr 14, 2006
Messages
140
Hi, last but not least, at least I hope, count me in.

I've done a hyperspace spell, MPI and MUI (if I remenber correctly the conditions).

You can cast multiple of it at the same time, and you can send a group of units at the same time; you can also create an hyperspace window and then add units by selecting them and right-clicking onto the fail.
Type "-help" ingame for help. And "-unlock" would be usefull for the camera ;).

Ship model done by myself.
 
Last edited:
Level 1
Joined
Sep 6, 2008
Messages
4
I've done more work on my spell, Gravitic Grenade.
More info was in my original post, at here.

"The user tosses the gravitic grenade, Protoss technology lifted from the Mothership.
The user takes up to one second to aim. The accuracy of the grenade depends on aim time.
The grenade sucks in enemies within its area of effect, while doing periodic damage. After a certain amount of time, the grenade then fires the enemy randomly in any direction."

There is now an aiming routine, I fixed up some odd stuff with bouncing, added a little more eyecandy, organized the code a little bit better, and made it a bit more moddable.

So, yeah.
 

Attachments

  • The Gravitic Grenade II.w3x
    119.4 KB · Views: 59
Level 9
Joined
Oct 11, 2009
Messages
477
Well, I found some major things on your spell:
bad:
Units getting low to 98% of their hitpoints are being healed fully. Throwing them does not trigger often, especially not after that 98%hp event and does not deal damage. In addition, the damage over time and the 1800 center damage do not work as i can see it. The testing Spiritwalkers cast Spirit Link, which may mess some of your damage outputs to single units.
You also use like 10 dummys on each single beam which are still selectable (I guess this is sort of a waste, there is one "Ion Beam" model here on hive).

good:
The special effect at the ending, it's electric sound and the slow, steady movement of the beams look really well. The idea is quite special, I liked that units getting close can sort of "free" other units, though it was hard to see.:wink:


Piranha, could you please review the triggers...
As you say that they are fully healed when they take 98% based on their maximum hitpoints and the 1800 damage for over 22.5 seconds. Remove the triggers' catergory "In-map Trigger(Not included)" and you will see what you are seeking...
 
Level 5
Joined
Aug 22, 2008
Messages
123
@sephiroth1234 I did not look into the codes. Please mention that health refill, it was sort of confusing. You can also add reincarnation to the units.

Since I won't have much time left today and don't know what else to add, I upload my submission now.

Checks:
-Mui, MPI. No limits here.
-No bugs found anymore.
-Multiple casts at a time (20-30) do not lagg, even on my computer...
-Optimized for performance.
-Leaks shall be cleared.
-Shall be easy to modify on the most important points, the testmap also contains a trigger to copy-paste the needed vars.

Description (taken out of the comments):
JASS:
//===============================
//Orbital Emergency Transport
//Created by Imbapiranha @Northrend (piranha89 @ Hiveworkshop)
//Created for the spellcontest on Hiveworkshop.com
//===============================

//****Description****\\
//You choose an aoe that contains some allied or own units. An automatic beamer will search primarily wounded friendly ground targets
//and try to teleport them to the rally point of the casting unit/structure. 
//The beam moves to his target and selects a circle that is supposed to teleport any allied units that stand in it. It will also pick up close allied units
//by widening his picking up circle. The teleporting beam will keep teleporting on his point until there is no unit to teleport left.
//Units that move while being teleported, will pause or increase their countdown until they stand still.

//****Basic datas****\\
//Uses no special imports or third party tools.
//Works on "Warcraft III- The Frozen Throne", patch version 1.24 or above
//Requires the basic data system that should be copied to the mapheader
//Effect while beaming, attached to origin/chest: "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl"
//Effect on beamed units: "Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdl", "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"

//****Extras****\\
//My main aim was to create a strategically useful and good-looking spell that could fit into the futuristic theme of Starcraft II. I also did not want
//to create yet another "black hole emp damage spell". Thinking about things that are uncommon or rare in Warcraft III mapping, I decided to use a teleporter
//with special functions that raise it's degree of complexity.

Credits go to Blizzard for making Warcraft 3 and the creator of Jasscraft, whose program made the work much easier.

Code:

Spellcode:
JASS:
//******************************************************
// 1 - Basic functionality and changeables
//******************************************************
//Reset unit data (not recommended to be changed)
function OETForGroupEnd takes nothing returns nothing
    call FlushCache4Handle(GetEnumUnit())
endfunction

//The filter conditions for picking units. Be careful when changing, "sfx" must stay, "bj_ghoul[0]" shall not be overwritten.
function OETFilter takes nothing returns boolean
    local integer sfx=bj_cineModeSavedSeed
    if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 then
        if IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==false then
            if IsUnitAlly(GetFilterUnit(),GetOwningPlayer(bj_ghoul[0])) or (GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(bj_ghoul[0])) then
                return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and (GetFilterUnit()!=bj_ghoul[0]) and not LoadBoolean(udg_Cache,GetX(GetFilterUnit()),sfx)
            endif
        endif
    endif
    return false
endfunction

//The dummy unittype that represents the beam
constant function OETDummy takes nothing returns integer
    return 'u000'
endfunction

//The radius, in which units are being picked up
constant function OETPickingRange takes nothing returns real
    return 550.0
endfunction

//The size of the target area that beamed units will be ported into
constant function OETPlacingRange takes nothing returns real
    return 150.0
endfunction

//Minimum size of the beam
constant function OETMinSize takes nothing returns real
    return 100.0
endfunction

//Maximum size of the beam
constant function OETMaxSize takes nothing returns real
    return 300.0
endfunction

//Steps you need to be beamed. Each step is 0.1 seconds. When changing them, you will also have to check when and where to place the special effects
//if you wish to keep them.
constant function OETSteps takes nothing returns integer
    return 10
endfunction

//Determines the rate at which the beam will move towards his targets
constant function OETSearchSpeed takes nothing returns real
    return 20.
endfunction

//Determines the rate at which the beam will move back to his starting point
constant function OETReturnSpeed takes nothing returns real
    return 25.
endfunction

//**************Grafics**************
//Dummyscale calculation: Basic scale+ X*radius
//Basic dummy scale
constant function OETScaleBase takes nothing returns real
    return 1.0
endfunction

//Scale*radius
constant function OETScaleRadius takes nothing returns real
    return .008
endfunction

//The Z scale of the dummy, may be useful when using beams...
constant function OETScaleZ takes nothing returns real
    return 10.
endfunction

//The animation speed of the dummy
constant function OETAnimSpeed takes nothing returns real
    return 5.
endfunction

//******************************************************
// 2 - Moving functions
//******************************************************

//******************************************************
// I-Getting a target
//******************************************************

function OETGetTarget takes integer sfx returns unit
    local unit u=null
    local unit target=null
    local unit caster=GetU(sfx,1)
    local real x=GetR(sfx,1)
    local real y=GetR(sfx,2)
    
    //Initialize the searching for the weakest unit
    call GroupClear(udg_Tempgroup)
    set bj_ghoul[0]=caster
    set bj_cineModeSavedSeed =sfx
    call GroupEnumUnitsInRange(udg_Tempgroup,x,y,OETPickingRange(),Filter(function OETFilter))
    
    set target=FirstOfGroup(udg_Tempgroup)
    
    //Now search
    loop
        set u=FirstOfGroup(udg_Tempgroup)
        exitwhen u==null
        call GroupRemoveUnit(udg_Tempgroup,u)
        
        if GetUnitState(u,UNIT_STATE_LIFE)<GetUnitState(target,UNIT_STATE_LIFE) then
            set target=u
        endif
        
    endloop
    
    //target contains the weakest unit now or NULL if there was none found.
    return target
endfunction


//******************************************************
// II-Moving towards target
//******************************************************

function OETBeamMoving takes integer sfx returns boolean
    local real x
    local real y
    local unit dummy=GetU(sfx,2)
    local real dx=GetUnitX(dummy)
    local real dy=GetUnitY(dummy)
    local unit target=GetU(sfx,3)
    
    if (GetR(sfx,1)-dx)*(GetR(sfx,1)-dx)+(GetR(sfx,2)-dy)*(GetR(sfx,2)-dy) >= (OETPickingRange()+50)*(OETPickingRange()+50) then  //Out of range 
        set target= OETGetTarget(sfx)
        call SaveU(target,sfx,3)
    endif
    
    set x=GetUnitX(target)
    set y=GetUnitY(target)
    
    if (x-dx)*(x-dx)+(y-dy)*(y-dy) <=OETSearchSpeed() then  //In range of 50
        call SetUnitX(dummy,x)
        call SetUnitY(dummy,y)
        return true
    endif
    
    if x>dx then
        if RealDiff(x,dx)<OETSearchSpeed() then
            call SetUnitX(dummy,x)
        else
            call SetUnitX(dummy,dx+OETSearchSpeed())
        endif
    elseif x<dx then
        if RealDiff(x,dx)<OETSearchSpeed() then
            call SetUnitX(dummy,x)
        else
            call SetUnitX(dummy,dx-OETSearchSpeed())
        endif
    endif
    
    if y>dy then
        if RealDiff(y,dy)<OETSearchSpeed() then
            call SetUnitY(dummy,y)
        else
            call SetUnitY(dummy,dy+OETSearchSpeed())
        endif
    elseif y<dy then
        if RealDiff(y,dy)<OETSearchSpeed() then
            call SetUnitY(dummy,y)
        else
            call SetUnitY(dummy,dy-OETSearchSpeed())
        endif
    endif
    
    return false //Go on moving, too far away
endfunction

//******************************************************
// III-Moving back to starting point
//******************************************************

function OETBeamBackMoving takes integer sfx returns boolean
    local unit dummy=GetU(sfx,2)
    local real dx=GetUnitX(dummy)
    local real dy=GetUnitY(dummy)
    
    if (GetR(sfx,1)-dx)*(GetR(sfx,1)-dx)+(GetR(sfx,2)-dy)*(GetR(sfx,2)-dy) <=2500 then  //In range of 50
        call SetUnitX(dummy,GetR(sfx,1))
        call SetUnitY(dummy,GetR(sfx,2))
        return true
    endif
    
    if GetR(sfx,1)>dx then
        if RealDiff(GetR(sfx,1),dx)<OETReturnSpeed() then
            call SetUnitX(dummy,GetR(sfx,1))
        else
            call SetUnitX(dummy,dx+OETReturnSpeed())
        endif
    elseif GetR(sfx,1)<dx then
        if RealDiff(GetR(sfx,1),dx)<OETReturnSpeed() then
            call SetUnitX(dummy,GetR(sfx,1))
        else
            call SetUnitX(dummy,dx-OETReturnSpeed())
        endif
    endif
    
    if GetR(sfx,2)>dy then
        if RealDiff(GetR(sfx,2),dy)<OETReturnSpeed() then
            call SetUnitY(dummy,GetR(sfx,2))
        else
            call SetUnitY(dummy,dy+OETReturnSpeed())
        endif
    elseif GetR(sfx,2)<dy then
        if RealDiff(GetR(sfx,2),dy)<OETReturnSpeed() then
            call SetUnitY(dummy,GetR(sfx,2))
        else
            call SetUnitY(dummy,dy-OETReturnSpeed())
        endif
    endif
    
    return false //Go on moving, not yet in the middle
endfunction

//******************************************************
// 3 - Beaming functions
//******************************************************

//******************************************************
// I- Calculating beaming range
//******************************************************

function OETCheckSize takes integer sfx returns real
    local unit dummy=GetU(sfx,2)
    local real array a
    local real array b
    local integer pointer=0
    local integer i=0
    local unit u=null
    local integer max=0
    local integer count=0
    local real dist
    local real x=GetUnitX(GetU(sfx,2))
    local real y=GetUnitY(GetU(sfx,2))
    //First get all distances of units in range
    call GroupClear(udg_Tempgroup)
    set bj_ghoul[0]=GetU(sfx,1)
    call GroupEnumUnitsInRange(udg_Tempgroup,x,y,OETMaxSize(),Filter(function OETFilter))
    if FirstOfGroup(udg_Tempgroup)!=null then
        loop
            set u=FirstOfGroup(udg_Tempgroup)
            exitwhen u==null
            call GroupRemoveUnit(udg_Tempgroup,u)
            set a[pointer]=SquareRoot((GetUnitX(u)-x)*(GetUnitX(u)-x) + (GetUnitY(u)-y)*(GetUnitY(u)-y))
            set pointer=pointer+1
        endloop
        
        set count=pointer
        
        //Bubblesort style
        loop
            exitwhen pointer<0
            //First get the biggest number
            set max=0
            set i=0
            loop
                exitwhen i>=pointer
                if a[i]>=a[max] then
                    set max=i
                endif
                set i=i+1
            endloop
            
            //Save it
            set b[pointer]=a[max]
            
            //Then delete it and move the other numbers afterwards
            loop
                exitwhen max>pointer
                set max=max+1
                set a[max-1]=a[max]
            endloop
            set pointer=pointer-1
        endloop
        
        //Ranges shall be sorted now
        //Check where to set the limits
        set i=0
        loop
            exitwhen b[i]+75>OETMinSize() or i>=count
            set i=i+1
        endloop
        
        loop
            exitwhen count==1
            exitwhen b[0]+75>OETMinSize() and b[0]+75<b[1] //just the first units in range of about 100+
            exitwhen b[i]+75>OETMaxSize() or i>=count   //Maximum range/all units checked
            exitwhen b[i]+75<b[i+1] //Cutplace
            set i=i+1
        endloop
        //Now let's see whether it skipped it's actions because of the limit or found a distance to cut in.
        set dist=b[i]+75
        if dist>OETMaxSize() then
            //Found nothing to cut in, go for max range
            set dist=OETMaxSize()
        endif
        
        //Show the increased range
        call SetUnitScale(dummy,OETScaleBase()+dist*OETScaleRadius(),OETScaleBase()+dist*OETScaleRadius(),OETScaleZ())
        
        return dist //Return the distance we found
    else
        return OETMaxSize()
    endif
endfunction

//******************************************************
// III- Actions for units in beaming range (ForGroup)
//******************************************************

function OETForGroupBeam takes nothing returns nothing
    //Currently untouched by teleporters
    local unit u=null
    local integer sfx=bj_cineModeSavedSeed
    local real x
    local real y
    local real ox
    local real oy
    local integer c
    local unit caster=GetU(sfx,1)
    local integer usfx
    local location rp=null
    //Unitcount in group
    
    if GetX(GetEnumUnit())==0 then
        call SetX(GetEnumUnit())
        call IncX()
    endif
    
    set usfx=GetX(GetEnumUnit())
    
    if LoadBoolean(udg_Cache,usfx,sfx) then
        return //Has been already targeted, stop all actions
    else
        set bj_forceCountPlayers=bj_forceCountPlayers+1 //Count if the target is ok.
    endif
    
    if IsUnitInGroup(GetEnumUnit(),udg_OETGroups[sfx])==false then
        //Came into range
        call GroupAddUnit(udg_OETGroups[sfx],GetEnumUnit())
        call SaveR(GetUnitX(GetEnumUnit()),usfx,1)
        call SaveR(GetUnitY(GetEnumUnit()),usfx,2)
        
        if GetI(usfx,1)==0 then
            call SaveI(OETSteps(),usfx,1) //Has to be OETSteps() times in range to be beamed. OETSteps * 0.1 seconds= 1 second for a teleport
        endif
    endif
    
    //Is in group now
    //Effects
    if GetI(usfx,1)==2 then
        call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetEnumUnit(),"overhead"))
    elseif GetI(usfx,1)==4 then
        call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetEnumUnit(),"head"))
    elseif GetI(usfx,1)==6 then
        call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetEnumUnit(),"chest"))
    elseif GetI(usfx,1)==8 then
        call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetEnumUnit(),"origin"))
    endif
    
    set x=GetUnitX(GetEnumUnit())
    set y=GetUnitY(GetEnumUnit())
    
    set ox=GetR(usfx,1)
    set oy=GetR(usfx,2)
    
    set c=GetI(usfx,1)-1
    
    if (ox-x)*(ox-x)+(oy-y)*(oy-y)>=25 then
        //Unit moved, having at least 25 Wu/sec speed, do not decrease c. Wu= Warcraft units.
        set c=c+1
        if (ox-x)*(ox-x)+(oy-y)*(oy-y)>=400 then
            //Unit moved, having at least 100 Wu/sec speed, increase c if it's not already 10.
            if c<OETSteps() then
                set c=c+1
            endif
        endif
    endif
    
    call SaveI(c,usfx,1)
    call SaveR(GetUnitX(GetEnumUnit()),usfx,1)
    call SaveR(GetUnitY(GetEnumUnit()),usfx,2)
    
    if c<=0 then
        //*********************Teleport to caster********************\\
        call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
        call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
        
        set rp=GetUnitRallyPoint(caster)
        if rp==null then
            call SetUnitPosition(GetEnumUnit(),GetUnitX(caster)+GetRandomReal(0,OETPlacingRange()),GetUnitY(caster)+GetRandomReal(0,OETPlacingRange()))
        else
            call SetUnitPosition(GetEnumUnit(),GetLocationX(rp)+GetRandomReal(0,OETPlacingRange()),GetLocationY(rp)+GetRandomReal(0,OETPlacingRange()))
            call RemoveLocation(rp)
            set rp=null
        endif
        
        call SaveBoolean(udg_Cache,usfx,sfx,true)//Has been ported by this beam now, do not port again
    endif
    
endfunction

//******************************************************
// II- Actions for units in beaming range (Basic)
//******************************************************

function OETBeamActions takes integer sfx returns boolean
    
    if udg_OETGroups[sfx]==null then
        set udg_OETGroups[sfx]=CreateGroup()
    endif
    
    call GroupClear(udg_Tempgroup)
    set bj_ghoul[0]=GetU(sfx,1)
    call GroupEnumUnitsInRange(udg_Tempgroup,GetUnitX(GetU(sfx,2)),GetUnitY(GetU(sfx,2)),GetR(sfx,3),Filter(function OETFilter))
    
    set bj_cineModeSavedSeed=sfx
    set bj_forceCountPlayers=0
    call ForGroup(udg_Tempgroup,function OETForGroupBeam)
    
    return bj_forceCountPlayers==0 //Skip when there are no units left
endfunction


//******************************************************
// 3 - Basic function that calls the previous functions (splitter)
//******************************************************

function OETSplit takes nothing returns nothing
    local timer t=GetExpiredTimer()
    local integer sfx=GetX(t)
    
    local real x=GetR(sfx,1)
    local real y=GetR(sfx,2)
    
    local unit target=GetU(sfx,3)
    local boolean swap=false
    local integer i=GetI(sfx,1)
    
    if i==0 then
        //0=Moving mode
        
        if target==null then
            set target=OETGetTarget(sfx)
        endif
        
        if target!=null then
            //Only go on if there are any targets.
            call SaveU(target,sfx,3)
            
            //**********************************************
            set swap=OETBeamMoving(sfx)
            //**********************************************
            if swap then
                //Within 50 range, change mode to beaming
                call SaveI(1,sfx,1)
                call SaveR(0,sfx,3)
            endif
            //**********************************************
            call TimerStart(t,0.04,false,function OETSplit)
            //**********************************************
        else
            //**********************************************
            //No targets found, ending spell...
            call DisplayTextToPlayer(GetOwningPlayer(GetU(sfx,1)),0,0,"|cffff0000No targets found.|r")
            call KillUnit(GetU(sfx,2))
            
            set target=CreateUnit(Player(15),'espv',x,y,0)
            call SetUnitPathing(target,false)
            call SetUnitPosition(target,x,y)
            call PauseUnit(target,true)
            call KillUnit(target)
            
            call ForGroup(udg_OETGroups[sfx],function OETForGroupEnd)//Clear data
            call DestroyGroup(udg_OETGroups[sfx])
            set udg_OETGroups[sfx]=null
            call FreeTimer(t)
            set target=null
            //**********************************************
        endif
    elseif i==1 then
        //1=Beaming mode
        if GetR(sfx,3)==0 then
            //No distance calculated by now
            call SaveR(OETCheckSize(sfx),sfx,3)
        endif
        
        //Distance must have been calculated by now
        //**********************************************
        set swap=OETBeamActions(sfx)
        //**********************************************
        
        if swap then
            //Finished beaming. Swap mode to mid moving.
            call SaveU(null,sfx,3)
            call SaveI(2,sfx,1)
            //Reset Dummy
            call SetUnitScale(GetU(sfx,2),OETScaleBase(),OETScaleBase(),OETScaleZ())
            //**********************************************
            call TimerStart(t,0.3,false,function OETSplit)
            //**********************************************
        else
            //**********************************************
            call TimerStart(t,0.1,false,function OETSplit)
            //**********************************************
        endif
    else
        //i=2, Backmoving to the middle
        //**********************************************
        set swap= OETBeamBackMoving(sfx)
        //**********************************************
        if swap then
            //In the middle again, change mode to searching
            call SaveI(0,sfx,1)
            call TimerStart(t,0.0,false,function OETSplit)
        else
            //**********************************************
            call TimerStart(t,0.04,false,function OETSplit)
            //**********************************************
        endif
    endif
    set target=null
endfunction

//******************************************************
// 5 - Function to get started
//******************************************************

function OrbitalEmergencyTransportStart takes unit caster, location l returns nothing
    local timer t=GetTimer()
    local integer sfx=udg_zz_index
    local real x=GetLocationX(l)
    local real y=GetLocationY(l)
    
    call RemoveLocation(l)
    set l=null
    
    call SetX(t)
    call IncX()
    
    //Unit saves
    call SaveU(caster,sfx,1)//Caster=>1
    
    //Create Dummy
    call SaveU(CreateUnit(GetOwningPlayer(caster),OETDummy(),x,y,0),sfx,2)//Beam=>2
    call SetUnitAnimation(GetU(sfx,2),"birth")
    call SetUnitScale(GetU(sfx,2),OETScaleBase(),OETScaleBase(),OETScaleZ())
    call SetUnitTimeScale(GetU(sfx,2),OETAnimSpeed())
    
    call SaveU(null,sfx,3) //Clear space for beaming targets=>3
    
    //Coordinates
    call SaveR(x,sfx,1) //Target X
    call SaveR(y,sfx,2) //Target Y
    call SaveR(0,sfx,3) //Clear space for beam's range
    
    //0=Move, 1=Beam, 2=Back to middle
    call SaveI(0,sfx,1)
    
    //Timer starts
    call TimerStart(t,1.0,false, function OETSplit)
endfunction

Basic functions to use hashtables and parallel arrays:
JASS:
//Spell contest systems

globals  
    hashtable udg_Cache
    integer udg_zz_index   //init:1
    group array udg_OETGroups
    group udg_Tempgroup
    
    unit array udg_zz_unit1
    unit array udg_zz_unit2
    unit array udg_zz_unit3   
    real array udg_zz_real1
    real array udg_zz_real2
    real array udg_zz_real3
    integer array udg_zz_integer1
    effect array udg_zz_effect1
    
    
    timer array udg_zz_Timers
    integer udg_zz_Pointer   //init:1
endglobals

//Attach Index
function SetX takes handle h returns nothing
    call SaveInteger( udg_Cache,GetHandleId(h),0,udg_zz_index)
endfunction

//Inc Index
function IncX takes nothing returns nothing
    set udg_zz_index=ModuloInteger(udg_zz_index+1,8000)
endfunction

//Get Index
function GetX takes handle h returns integer
    return LoadInteger(udg_Cache,GetHandleId(h),0)
endfunction

//Storing
function SaveE takes effect eff, integer sfx, integer place returns nothing
    if place==1 then
        set udg_zz_effect1[sfx]=eff
    endif
    set eff=null
endfunction

function SaveU takes unit u, integer sfx, integer place returns nothing
    if place==1 then
        set udg_zz_unit1[sfx]=u
    elseif place==2 then
        set udg_zz_unit2[sfx]=u
    elseif place==3 then
        set udg_zz_unit3[sfx]=u
    endif
    set u=null
endfunction

function SaveI takes integer int, integer sfx, integer place returns nothing
    if place==1 then
        set udg_zz_integer1[sfx]=int
        //elseif place==2 then
        // set udg_zz_integer2[sfx]=int
    endif
endfunction

function SaveR takes real r, integer sfx, integer place returns nothing
    if place==1 then
        set udg_zz_real1[sfx]=r
    elseif place==2 then
        set udg_zz_real2[sfx]=r
        elseif place==3 then
            set udg_zz_real3[sfx]=r
        // elseif place==4 then
        //    set udg_zz_real4[sfx]=r
    endif
endfunction

//**************************************\\
//Get SFX
function GetE takes integer sfx, integer place returns effect
    local effect e
    if place==1 then
        set e= udg_zz_effect1[sfx]
    endif
    return e
endfunction

function GetR takes integer sfx, integer place returns real
    local real r
    if place==1 then
        set r= udg_zz_real1[sfx]
        elseif place==2 then
           set r= udg_zz_real2[sfx]
        elseif place==3 then
           set r= udg_zz_real3[sfx]
        //elseif place==4 then
        //    set r= udg_zz_real4[sfx]
    endif
    return r
endfunction

function GetI takes integer sfx, integer place returns integer
    local integer i
    if place==1 then
        set i= udg_zz_integer1[sfx]
        //elseif place==2 then
        //   set i= udg_zz_integer2[sfx]
    endif
    return i
endfunction

function GetU takes integer sfx, integer place returns unit
    local unit u
    if place==1 then
        set u=udg_zz_unit1[sfx]
    elseif place==2 then
        set u=udg_zz_unit2[sfx]
    elseif place==3 then
        set u=udg_zz_unit3[sfx]
    endif
    return u
endfunction

//**************************************\\
function FlushCache4Handle takes handle h returns nothing
    call FlushChildHashtable(udg_Cache,GetHandleId(h))
endfunction

//***********************************************\\
//Timer recycling Sys
function GetTimer takes nothing returns timer
    set udg_zz_Pointer=udg_zz_Pointer+1
    
    if  not((udg_zz_Pointer<0) or(udg_zz_Pointer>8190)) then
        //Pointer in his limits
        if  (udg_zz_Timers[udg_zz_Pointer]==null) then
            set udg_zz_Timers[udg_zz_Pointer]=CreateTimer()
        endif
        
        call SaveBoolean(udg_Cache,GetHandleId(udg_zz_Timers[udg_zz_Pointer]),-1,false)
        return udg_zz_Timers[udg_zz_Pointer]
        
    else
        //Pointer exception
        call BJDebugMsg("[FATAL ERROR CAUGHT]: Timerpointer @ Timerstack breaks its limits- "+I2S(udg_zz_Pointer))
        return null
    endif
endfunction


function FreeTimer takes timer t returns nothing
    local boolean sfx=LoadBoolean(udg_Cache,GetHandleId(t),-1)
    if (not sfx) then
        call FlushCache4Handle(t)
        //Tag as free
        call SaveBoolean(udg_Cache,GetHandleId(t),-1,true)
        set udg_zz_Timers[udg_zz_Pointer]=t
        set udg_zz_Pointer=udg_zz_Pointer-1
    endif
endfunction

function RealDiff takes real r1, real r2 returns real
    local real r=r1-r2
    if r<0 then
        return r*(-1)
    endif
    return r
endfunction
 

Attachments

  • Spellcontest.w3x
    40.9 KB · Views: 73
Level 11
Joined
Sep 30, 2009
Messages
697
Here is my spell: E.M.P Strike :

The Battle Crawler shoots an E.M.P-Missile which deals AoE damage to all mechanical units on impact.
The units are disabled and regain their Attack- and Movementspeed after a short amount of time.
Flying units are also disabled to fly, so they fall down to the ground taking some extra damage.

Requires NewGenWe with newest Jasshelper
Credits go to Vexorian for Jasshelper; Also Credits to anarchianbedlam for his model(the crawlers)

How to Import:
Import the spell and the three abilities and the 2 buffs and check the rawcodes. Change the values to what you need and hf
 

Attachments

  • E.M.P-Strike.w3x
    131.7 KB · Views: 43
Last edited:
Level 3
Joined
Aug 1, 2007
Messages
27
I'm out, the whole shit bugs and have no time to fix it. Sorry.

Yeah, I'm out for the same reason.
Also, I didn't have any idea which wasn't already posted.
I think i just don't like future scenarios... óÒ

Good luck to everyone!
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
I had two ideas but worked on this one.

Blasts the ground with negative energy, changing a few enemy units gravity. As they fly upwards the negative energy disrupts and the units gain their gravity again. On hit with the ground units take damage according to which height they had when they gained back their gravity.
Dealing a small amount of the damage in an 180 AOE and stun nearby units for a very short moment.

Level 1 - Deals 70 + 8% of the max height.
Level 2 - Deals 120 + 14% of the max height.
Level 3 - Deals 170 + 20% of the max height.

Max height, casting range and aoe increases by level.
 
Level 5
Joined
May 12, 2008
Messages
77
I join the contest (my first one) with the following spell (first spell posted).

As I'm German (and so I use the German WE and poor quality English) all triggers would be in German and therefore I won't post anything else except my spell.

If you are interested in what it is like then just take a look at it and enjoy :ugly:
 

Attachments

  • Search and Destroy.w3x
    35.3 KB · Views: 55
Level 2
Joined
Apr 27, 2010
Messages
12
well here is my spell
im sure its the smalles one with codes but i thinkt is is cool^^.
It is my first triggert spell.:grin:
 

Attachments

  • SpellcontestFate.w3x
    37.5 KB · Views: 91
Level 5
Joined
Aug 22, 2008
Messages
123
@Piranha: Your code doesnt justify your attitude towards others. Learn to write decent code, then come back. Start with learning vJass and get to know the many libraries out there doing fascinating things for you.

I already wondered, which trolling kid would be the first one to do such poor accusations. It was you, congratulations. Running /ignore mode... Done.

Guys, the contest's already closed, hope you get an exception, Fate and alpha, and Axarion, and piranah, lol.
It is open until the end of 30th april as the first post says. And it is still the 30th april, at least in GMT.
The moderator did not even mention what time-zone this is related to, but I guess he is thinking of GMT.
 
Level 2
Joined
Apr 10, 2010
Messages
22
jahoooo!
finished
my spell

nuclear rocket:
fires a nuclear rocket on the target location. the explosion will damge the units in an AoE of 150 /300/450. the Aoe will get conterninated with radioactivity.
Units in the AoE will get overtime - damage. if their life becomes less than 55/60/65% of their original life, their is a chance of 15/30/45% that they'll mutate.

Ps: my first spell.....
 
Last edited:
Level 11
Joined
Dec 31, 2007
Messages
780
I casted antimatter shiver like 20 times and this happened

Bugantimatter.jpg


***

Hyperspace lets you go outside map boundaries and you can never come back

***

Nuclear missile: first time i casted it, it did nothing. The rest of the times it only made initial damage and then nothing

***

Gravitic grenade:

I think this shouldn't happen

Graviticgrenade.jpg


Your spell has many bugs, like:

You can cut the channeling but the spell comes out anyways.
you can cast lots of grenades at the same time (like in the picture)
Sometimes units keeps fliying.
You can walk the whole map throwing bombs and they will come out when you stop (you can mine the entire map)
your dummy units uses food (upkeep).

***

Singularity attack: You have melee triggers?
 
Level 1
Joined
Sep 6, 2008
Messages
4
Thanks for giving it a look, darkrider.

Updated it and fixed a few bugs. Fixed the aiming routine; it'll actually miss now (forgot to add a miss distance.) The spell firing even after a cancelled channel is intentional; the one second channel's for aiming. Added a cooldown, and removed the food on the dummy.
 

Attachments

  • The Gravitic Grenade III.w3x
    119.5 KB · Views: 80
Level 3
Joined
Dec 21, 2008
Messages
26
Magnetic Pulse

Attracts all unit towards its center,
Once close enough then starts to damage them ;)

Well for 2 hours work i'm proud,

also note : The magnet spins... and it lasts for a short amount of time to stop it being OP.
good night face bookers hive users :hohum:

( man I love smilies... )

Good luck judging trigger,
P.S. you got my bribe right ? :thumbs_up: ( joking if anyone is taking me seriously xD )
 

Attachments

  • MagneticPulse.w3x
    20 KB · Views: 81
Status
Not open for further replies.
Top