1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Starcraft II Beta Key Spell Contest

Discussion in 'Triggers & Scripts' started by TriggerHappy, Apr 25, 2010.

  1. elfian

    elfian

    Joined:
    Jun 28, 2008
    Messages:
    350
    Resources:
    2
    Maps:
    2
    Resources:
    2
    OK, Guess I will try my skills too, for the first time. One question: Can the spell be a Unit Spell which can be upgraded from a building for example?
     
  2. darkrider

    darkrider

    Joined:
    Dec 31, 2007
    Messages:
    780
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Im in =D

    I hope i can finish it in time for the deadline

    I wonder... Does it have to be an astonishing spell or could it be something simple and modest? as I'm with exams now and got not enough time :(

    I was thinking in some sort of "sonic concussion grenade" or something :p

    BTW, If i finish it, this will be my first entry in a competition :O
     
  3. hell gate

    hell gate

    Joined:
    Nov 23, 2008
    Messages:
    477
    Resources:
    10
    Models:
    1
    Spells:
    9
    Resources:
    10
    i'm also in
    i'm not the best one in vJass but i try what i can do :)
     
  4. HyperActive

    HyperActive

    Joined:
    Dec 1, 2006
    Messages:
    340
    Resources:
    1
    Maps:
    1
    Resources:
    1
    This is what I'm making. I'll try and code it tonight, shouldn't be hard.


    Forms two wormholes, one at the position of spell casting, and another that will follow the hero as he walks. After 5 seconds the wormholes will activate, transporting all units near the Protoss Templar to the original wormhole. Enemy units will be damaged during the transportation.

    Level 1 - Wormhole has a 200 radius, and deals 100 damage to enemies.
    Level 2 - Wormhole has a 275 radius, and deals 175 damage to enemies.
    Level 3 - Wormhole has a 350 radius, and deals 250 damage to enemies.
     
  5. D3zmodos

    D3zmodos

    Joined:
    Aug 9, 2008
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Are things such as TimerUtils/GroupUtils counted as utilities? (considering that it is TimerUTILS :p

    Edit: What about Table?

    Edit 2: What about AutoIndex? (ok AutoIndex is quite a bit system but its not as if it writes a spell for me like a projectile system does :D?)
     
  6. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,757
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Those are all fine.
     
  7. bowser499

    bowser499

    Joined:
    Jul 20, 2009
    Messages:
    782
    Resources:
    7
    Tools:
    1
    Maps:
    3
    Spells:
    3
    Resources:
    7
    TriggerHappy
    Can I post my spell or I must wait some time?
     
  8. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Sounds like a ultimate in HON, Kraken.

    I think I got my ideas straight clear now, starting to code.
     
  9. bowser499

    bowser499

    Joined:
    Jul 20, 2009
    Messages:
    782
    Resources:
    7
    Tools:
    1
    Maps:
    3
    Spells:
    3
    Resources:
    7
    The Spell

    So, here I go...
    Hope my coding isn't very bad...
    My spell is called "Multishock". Fires deadly rocket at the target point. When it reaches the point it blows and releases energetic shock that deals some damage to units in radius 400 from the target point. Also creates lightning circle that damages units inside it and vanishes.
    [Warning: lightning spheres may not vanish. If so, cast the skill one more time ;)]

    | 1 lvl | 1 trigger | MUI | Leakless | non-import |

    Coding:

    Code (vJASS):
    function Trig_Futur_Spell_Conditions takes nothing returns boolean
        return GetSpellAbilityId() == 'A000'
    endfunction

    function Futur_Spell_Remove_Dmger takes nothing returns nothing
        local unit u = LoadUnitHandle(udg_Hashtable,GetHandleId(GetExpiredTimer()),0)
        call KillUnit(u)
        call FlushChildHashtable(udg_Hashtable,GetHandleId(GetExpiredTimer()))
        call DestroyTimer(GetExpiredTimer())
        set u = null
    endfunction

    function Futur_Spell_Dmg_Filter takes nothing returns boolean
        local unit u = GetFilterUnit()
        local unit caster = LoadUnitHandle(udg_Hashtable,GetHandleId(GetExpiredTimer()),5)
        local timer t
        if IsUnitEnemy(u,GetOwningPlayer(caster)) == true then
            set t = CreateTimer()
            call IssueTargetOrderById(caster,852119,u)
            call TimerStart(t,1,false,function Futur_Spell_Remove_Dmger)
            call SaveUnitHandle(udg_Hashtable,GetHandleId(t),0,caster)
            set t = null
        endif
        set u = null
        set caster = null
        return false
    endfunction

    function Futur_Spell_DamageEnemies takes nothing returns nothing
        local real tx = LoadReal(udg_Hashtable,GetHandleId(GetExpiredTimer()),0)
        local real ty = LoadReal(udg_Hashtable,GetHandleId(GetExpiredTimer()),1)
        local group g = CreateGroup()
        call SaveUnitHandle(udg_Hashtable,GetHandleId(GetExpiredTimer()),5,GetEnumUnit())
        call GroupEnumUnitsInRange(g,tx,ty,400,Filter(function Futur_Spell_Dmg_Filter))
        call GroupClear(g)
        call DestroyGroup(g)
        set g = null  
    endfunction

    function Futur_Spell_CircleCreate takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local real tx = LoadReal(udg_Hashtable,GetHandleId(t),0)
        local real ty = LoadReal(udg_Hashtable,GetHandleId(t),1)
        local real face = LoadReal(udg_Hashtable,GetHandleId(t),2)
        local group g = LoadGroupHandle(udg_Hashtable,GetHandleId(t),3)
        local real x = tx + 400 * Cos(face * 0.0174532)
        local real y = ty + 400 * Sin(face * 0.0174532)
        local unit caster = LoadUnitHandle(udg_Hashtable,GetHandleId(t),4)
        call GroupAddUnit(g,CreateUnit(GetOwningPlayer(caster),'n002',x,y,0))
        call SaveGroupHandle(udg_Hashtable,GetHandleId(t),3,g)
        call SaveReal(udg_Hashtable,GetHandleId(t),2,face + 5)
        if face >= 360 then
            call ForGroup(g,function Futur_Spell_DamageEnemies)
            call FlushChildHashtable(udg_Hashtable,GetHandleId(t))
            call PauseTimer(t)
            call DestroyTimer(t)
        endif
        set t = null  
        set caster = null
        set g = null    
    endfunction

    function Futur_Spell_Group takes nothing returns boolean
        local unit u = GetFilterUnit()
        local unit caster = LoadUnitHandle(udg_Hashtable,GetHandleId(GetExpiredTimer()),3)
        if GetUnitFlyHeight(u) == 0 and IsUnitType(u,UNIT_TYPE_DEAD) == false and u != caster then
            call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Purge\\PurgeBuffTarget.mdl",u,"chest"))
            call UnitDamageTarget(caster,u,5,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_LIGHTNING,WEAPON_TYPE_WHOKNOWS)
        endif
        set u = null
        set caster = null
        return false
    endfunction

    function Futur_Spell_Effects_Create takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local real tx = LoadReal(udg_Hashtable,GetHandleId(t),0)
        local real ty = LoadReal(udg_Hashtable,GetHandleId(t),1)
        local integer i = GetRandomInt(50,400)
        local real i2 = GetRandomReal(0,359) * 0.0174532
        local real x = tx + i * Cos(i2)
        local real y = ty + i * Sin(i2)
        local integer count = LoadInteger(udg_Hashtable,GetHandleId(t),2)
        local unit caster = LoadUnitHandle(udg_Hashtable,GetHandleId(t),3)  
        local group g = CreateGroup()
        local timer t2
        call GroupEnumUnitsInRange(g,tx,ty,400,Filter(function Futur_Spell_Group))
        call GroupClear(g)
        call DestroyGroup(g)  
        call SaveInteger(udg_Hashtable,GetHandleId(t),2,count + 1)
        if count <= 20 then
            call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",x,y))    
        else
            call FlushChildHashtable(udg_Hashtable,GetHandleId(t))
            set t2 = CreateTimer()
            call SaveReal(udg_Hashtable,GetHandleId(t2),0,tx)
            call SaveReal(udg_Hashtable,GetHandleId(t2),1,ty)
            call SaveReal(udg_Hashtable,GetHandleId(t2),2,1)
            call SaveGroupHandle(udg_Hashtable,GetHandleId(t2),3,CreateGroup())
            call SaveUnitHandle(udg_Hashtable,GetHandleId(t2),4,caster)
            call TimerStart(t2,0.04,true,function Futur_Spell_CircleCreate)
            call PauseTimer(t)
            call DestroyTimer(t)
            set t2 = null
        endif
        set g = null
        set t = null
        set caster = null
    endfunction

    function Futur_Spell_Rocket_Move takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local unit caster = LoadUnitHandle(udg_Hashtable,GetHandleId(t),3)
        local unit rocket = LoadUnitHandle(udg_Hashtable,GetHandleId(t),0)
        local real rx = GetUnitX(rocket)
        local real ry = GetUnitY(rocket)
        local real tx = LoadReal(udg_Hashtable,GetHandleId(t),1)
        local real ty = LoadReal(udg_Hashtable,GetHandleId(t),2)
        local real a = GetUnitFacing(rocket) * 0.0174532
        local real x = rx + 30 * Cos(a)
        local real y = ry + 30 * Sin(a)
        local timer t2
        if SquareRoot((tx - rx) * (tx - rx) + (ty - ry) * (ty - ry)) <= 100 then
            call FlushChildHashtable(udg_Hashtable,GetHandleId(t))
            call KillUnit(rocket)
            call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",tx,ty))
            call PauseTimer(t)
            call DestroyTimer(t)
            set t2 = CreateTimer()
            call SaveUnitHandle(udg_Hashtable,GetHandleId(t2),3,caster)
            call SaveReal(udg_Hashtable,GetHandleId(t2),0,tx)
            call SaveReal(udg_Hashtable,GetHandleId(t2),1,ty)
            call TimerStart(t2,0.08,true,function Futur_Spell_Effects_Create)  
            set t2 = null
        else
            call SetUnitX(rocket,x)
            call SetUnitY(rocket,y)
        endif
        set caster = null
        set rocket = null
        set t = null
    endfunction

    function Trig_Futur_Spell_Actions takes nothing returns nothing
        local unit caster = GetTriggerUnit()
        local real cx = GetUnitX(caster)
        local real cy = GetUnitY(caster)
        local real tx = GetSpellTargetX()
        local real ty = GetSpellTargetY()
        local real face = 57.295827 * Atan2(ty - cy,tx - cx)
        local unit rocket = CreateUnit(GetOwningPlayer(caster),'n000',cx,cy,face)
        local timer t = CreateTimer()
        if udg_Hashtable == null then
            set udg_Hashtable = InitHashtable()
        endif
        call SaveUnitHandle(udg_Hashtable,GetHandleId(t),0,rocket)
        call SaveReal(udg_Hashtable,GetHandleId(t),1,tx)
        call SaveReal(udg_Hashtable,GetHandleId(t),2,ty)
        call SaveUnitHandle(udg_Hashtable,GetHandleId(t),3,caster)
        call TimerStart(t,0.04,true,function Futur_Spell_Rocket_Move)
        set caster = null
        set rocket = null
        set t = null
    endfunction

    //===========================================================================
    function InitTrig_Futur_Spell takes nothing returns nothing
        set gg_trg_Futur_Spell = CreateTrigger(  )
        call TriggerRegisterAnyUnitEventBJ( gg_trg_Futur_Spell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
        call TriggerAddCondition( gg_trg_Futur_Spell, Condition( function Trig_Futur_Spell_Conditions ) )
        call TriggerAddAction( gg_trg_Futur_Spell, function Trig_Futur_Spell_Actions )
    endfunction


    Credit to the Blizzard ent. for the incredible game ^^

    Download and enjoy!

    Good luck to all of the contestants!
     

    Attached Files:

  10. D4RK_G4ND4LF

    D4RK_G4ND4LF

    Joined:
    Feb 4, 2009
    Messages:
    1,196
    Resources:
    20
    Models:
    3
    Spells:
    15
    Tutorials:
    2
    Resources:
    20
    d'oh! why couldn't it end at weekend? :eekani:
    I'll just screw school to win anyway :p
     
  11. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    On the third cast, the lightning circle occurs and pauses. It won't kill the effect with the lightnings following. Check it out :)
     
  12. Eccho

    Eccho

    Joined:
    Nov 29, 2006
    Messages:
    2,297
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Clearify!

    Time of the day? Between the night of Friday to Saturday?

    Timezone?
     
  13. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    23:59 GMT as usual :p
     
  14. bowser499

    bowser499

    Joined:
    Jul 20, 2009
    Messages:
    782
    Resources:
    7
    Tools:
    1
    Maps:
    3
    Spells:
    3
    Resources:
    7
    Ha... Should put the killing func in another piece of code :)
     
  15. darkrider

    darkrider

    Joined:
    Dec 31, 2007
    Messages:
    780
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Well... here is my map.

    Its intended to be MUI (first one i make like this).

    You only need normal WE.

    Made in GUI.

    I just wish i could've had more time (stupid exam ¬¬)

    Anyways... here it is


    PS: I wish you luck guys let the best wins =D

    EDIT: Might be better to test it if skill has no cooldown and no mana consumption :p (then you can shift-order all of the marines to cast the skill a ton of times )
     

    Attached Files:

    Last edited: Apr 27, 2010
  16. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    AutoIndex is 800 lines of code long and he can use that while I can't use my projectiles?

    Whatever then I'm out this contest is stupid. I've given justification as to why there is no reason projectiles shouldn't be allowed and nobody has responded, and now people are being able to use AutoIndex but I can't even use a system I made myself. I'm out. I'm not for bullshit rules that favor a select few people.
     
  17. Preskooldude

    Preskooldude

    Joined:
    Jul 23, 2005
    Messages:
    329
    Resources:
    0
    Resources:
    0
    Here is mine: IntraNET(Intra-Nodal Engineering Technology), a unit spell.
    Based off of the Vulture's Spidermines, this new ability deploys IntraNET Nodes. The nodes join together in a web-like fashion. When a new node is deployed, the rest of the web slowly changes function into the new node's function.
    The three functions are thus:
    Attack: Allows the tower to throw projectiles dealing 5 damage each.
    Healing: Allows the tower to heal friendly units, healing 5 damage each.
    Explode: Detonates the web, dealing 30 damage per explosion (15 damage at the fringes)

    EDIT: Updated a newer version. See later post for new download link.
     
    Last edited: Apr 27, 2010
  18. darkrider

    darkrider

    Joined:
    Dec 31, 2007
    Messages:
    780
    Resources:
    1
    Maps:
    1
    Resources:
    1

    Attached Files:

  19. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,757
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    No one cares.

    EDIT: I don't care.
     
  20. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    In fact, i do. I find such posts to be a wonderful example of why prohibiting use of libraries is a bad idea.