• 🏆 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!

Spells & Systems Mini-Contest #20

Status
Not open for further replies.
Level 17
Joined
Jun 28, 2008
Messages
776
Here's a wip


JASS:
//----------------------------------------------------------------------------------
//Sheep Strike
//Spells and systems contest #20
//Created by : Xiliger
//Uses :
//  TimerUtils by Vexorian
//  Parabolic movement by Mayoc/Spec
//----------------------------------------------------------------------------------

scope SheepStrike initializer Init

globals

    private constant integer SPELLID                        = 'A000'
        //This is the abilities id
    private constant integer UNITID                         = 'n000'
        //This is the sheep dummy units id
    private constant integer MAXCOUNT                       = 5
        //This is the maximum units that gets created
    private constant real MAXDISTANCE                       = 800.00
        //This is the distance from the cast point the units will summon
    private constant real UNITDISTANCE                      = 75.00
        //This is the distance between units as they are summoned
    private constant real MAXHEIGHT                         = 300.00
        //This is the flying height that the units gets spawned
    private constant real MAXHEIGHTPARABOLA                 = 500.00
        //This is the maximum height for the parabolic movement
    private constant real MOVEDISTANCE                      = 18.00
        //This is the distance a unit is moved by the timer
    private constant string SPELLEFFECT1                    = "Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl"
        //This is the "Fire Effect" added to the sheep
    private constant string SPELLEFFECT2                    = "Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl"

endglobals

private function GetDistance takes nothing returns real //Returns a random distance

    local real rMin = 50  //This is the min value for the random distance
    local real rMax = 450 //This is the max value for the random distance

    return GetRandomReal(rMin, rMax)

endfunction

struct Data

    unit dUnit      = null
    unit dCaster    = null
    real dDistance  = 0.00
    real dCDistance = 0.00
    real dAngle     = 0.00
    real x          = 0.00
    real y          = 0.00
    effect dEffect1 = null
    effect dEffect2 = null
    boolean dBool1  = false
    boolean dBool2  = false
    boolean dBool3  = false
    integer dVertex = 0
    
    static method create takes unit caster, real x, real y, real a, real d returns Data
    
        local Data dat = Data.allocate()
        local timer t  = NewTimer()
        
        set dat.dUnit     = CreateUnit(GetOwningPlayer(caster), UNITID, x, y, a)
        set dat.dCaster   = caster
        set dat.dDistance = d
        set dat.dAngle    = a
        
        call SetUnitVertexColor(dat.dUnit, 225, 225, 225, 0)
        call SetUnitFlyHeight(dat.dUnit, MAXHEIGHT, 0)
        call SetTimerData(t, dat)
        call TimerStart(t, 0.05, true, function Data.onLoop)
        
        return dat
    
    endmethod
    
    private static method onLoop takes nothing returns nothing
    
        local timer t  = GetExpiredTimer()
        local Data dat = GetTimerData(t)
        local real x   = GetUnitX(dat.dUnit) + MOVEDISTANCE * Cos(dat.dAngle * bj_DEGTORAD)
        local real y   = GetUnitY(dat.dUnit) + MOVEDISTANCE * Sin(dat.dAngle * bj_DEGTORAD)
        local real d   = 0
        
        set dat.x = GetUnitX(dat.dUnit)
        set dat.y = GetUnitY(dat.dUnit)
        
        if dat.dVertex < 255 then
        
            set dat.dVertex = dat.dVertex + 15
            call SetUnitVertexColor(dat.dUnit, 255, 255, 255, dat.dVertex)
            
        endif
        
        //-------------------------------------------------------------------------------------------
        //------------------This is the first phase of the spell-------------------------------------
        //-------------------------------------------------------------------------------------------
        
        if (dat.dDistance > dat.dCDistance) and (dat.dBool2 == false) then
        
            call SetUnitX(dat.dUnit, x)
            call SetUnitY(dat.dUnit, y)
            
            set dat.dCDistance = dat.dCDistance + MOVEDISTANCE
            
            if (dat.dCDistance > (dat.dDistance / 2)) and (dat.dBool1 == false) then
            
                set dat.dEffect1 = AddSpecialEffectTarget(SPELLEFFECT1, dat.dUnit, "origin")
                set dat.dBool1   = true
            
            endif
        
        else //The following code switches to the second phase
            
            if dat.dBool2 == false then
            
                set d              = GetDistance()
                set dat.dBool2     = true
                set dat.dBool3     = true
                set dat.dAngle     = GetRandomReal(0, 359)
                set x              = GetUnitX(dat.dUnit) + d * Cos(dat.dAngle * bj_DEGTORAD)
                set y              = GetUnitY(dat.dUnit) + d * Sin(dat.dAngle * bj_DEGTORAD)
                set dat.dDistance  = SquareRoot((x - GetUnitX(dat.dUnit)) * (x - GetUnitX(dat.dUnit)) + (y - GetUnitY(dat.dUnit)) * (y - GetUnitY(dat.dUnit)))
                set dat.dCDistance = 0
            
            endif
        
        endif
        
        //-------------------------------------------------------------------------------------------
        //------------------This is the second phase of the spell------------------------------------
        //-------------------------------------------------------------------------------------------
        
        if (dat.dDistance > dat.dCDistance) and (dat.dBool2 == true) then
        
            set dat.dCDistance = dat.dCDistance + 15
            
            set x = dat.x + 15 * Cos(dat.dAngle * bj_DEGTORAD)
            set y = dat.y + 15 * Sin(dat.dAngle * bj_DEGTORAD)
            
            call SetUnitX(dat.dUnit, x)
            call SetUnitY(dat.dUnit, y)
            
            call SetUnitFlyHeight(dat.dUnit, ParabolaZ2( MAXHEIGHT, 0, MAXHEIGHTPARABOLA, dat.dDistance, dat.dCDistance), 0)
        
        else
        
            if dat.dBool3 == true then
        
                set dat.dBool3 = false
        
                call DestroyEffect(AddSpecialEffectTarget(SPELLEFFECT2, dat.dUnit, "origin"))
            
            endif
        
        endif
    
    endmethod

endstruct

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

private function Actions takes nothing returns nothing

    local unit u    = GetTriggerUnit()
    local real x    = GetSpellTargetX()
    local real y    = GetSpellTargetY()
    local real a    = bj_RADTODEG * Atan2(y - GetUnitY(u), x - GetUnitX(u))
    local integer i = 0
    
    set x = x + MAXDISTANCE * Cos((a - 180) * bj_DEGTORAD)
    set y = y + MAXDISTANCE * Sin((a - 180) * bj_DEGTORAD)
    
    loop
    
        call Data.create(u, x, y, a, (MAXDISTANCE + ( i * UNITDISTANCE)))
    
        set i = i + 1
    
        set x = x + UNITDISTANCE * Cos((a - 180) * bj_DEGTORAD)
        set y = y + UNITDISTANCE * Sin((a - 180) * bj_DEGTORAD)
    
        exitwhen i == MAXCOUNT
    
    endloop

endfunction

private function Init takes nothing returns nothing

    local trigger tr = CreateTrigger()
    
    call TriggerRegisterAnyUnitEventBJ( tr, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( tr, Condition( function Conditions ) )
    call TriggerAddAction( tr, function Actions )
    
endfunction

endscope
 

Attachments

  • Xiliger Entry - Sheep Strike.w3x
    55.8 KB · Views: 60
equilifrium-strike-uploa.png


spell starts at 0:40

BTNCleavingAttack.jpg


Equilibrium Strike

Irelia's attack balances the scales, dealing damage and slowing the target. However, if the target has a higher health percentage than Irelia, then the blow stuns the target instead.

Level 1 - Pierces her target, dealing 100 + 0.30 agility in damage. Stuns/Slows by 60% for 1.2 seconds.
Level 2 - Pierces her target, dealing 140 + 0.60 agility in damage. Stuns/Slows by 60% for 1.6 seconds.
Level 3 - Pierces her target, dealing 180 + 0.90 agility in damage. Stuns/Slows by 60% for 2 seconds.


  • Equilibrium Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Equilibrium Strike
    • Actions
      • -------- --- --------
      • -------- Setting the spell constants --------
      • -------- --- --------
      • Set ES_Caster = (Triggering unit)
      • Set ES_Target = (Target unit of ability being cast)
      • Set ES_Ability_Level = (Level of (Ability being cast) for ES_Caster)
      • Set ES_Owner = (Owner of ES_Caster)
      • -------- --- --------
      • -------- Setting the spell values --------
      • -------- --- --------
      • Set ES_Base_Damage = 60.00
      • Set ES_Level_Damage = 40.00
      • Set ES_Atribute_Factor = 0.30
      • Set ES_Atribute_Damage = (Agility of ES_Caster (Include bonuses))
      • -------- --- --------
      • -------- Setting the dummy abilities --------
      • -------- --- --------
      • Set ES_Dummy_Ability_Slow = Equilibrium Strike(dummy slow)
      • Set ES_Dummy_Ability_Stun = Equilibrium Strike(dummy stun)
      • -------- --- --------
      • -------- Setting the spell values/locations for special effects --------
      • -------- --- --------
      • Set ES_Spell_Loc = (Position of ES_Target)
      • Set ES_Spell_Loc_2 = (Position of ES_Caster)
      • Set ES_Facing_Angle = (Angle from ES_Spell_Loc to ES_Spell_Loc_2)
      • Set ES_SFX_Offset = 200.00
      • Set ES_SFX_Angle = 50.00
      • Set ES_SFX_Duration = 1.00
      • Set ES_SFX_Loc = (ES_Spell_Loc_2 offset by ES_SFX_Offset towards (ES_Facing_Angle + ES_SFX_Angle) degrees)
      • Set ES_SFX_Loc_2 = (ES_Spell_Loc_2 offset by ES_SFX_Offset towards (ES_Facing_Angle - ES_SFX_Angle) degrees)
      • -------- --- --------
      • -------- Calculating the damage --------
      • -------- --- --------
      • Set ES_Damage_Calculation = (ES_Base_Damage + ((Real(ES_Ability_Level)) x ES_Level_Damage))
      • Set ES_Atribute_Damage_Calculation = ((Real(ES_Ability_Level)) x (ES_Atribute_Factor x (Real(ES_Atribute_Damage))))
      • -------- --- --------
      • Set ES_Total_Damage = (ES_Atribute_Damage_Calculation + ES_Damage_Calculation)
      • -------- --- --------
      • -------- Creating some nice special effects --------
      • -------- --- --------
      • Special Effect - Create a special effect attached to the weapon of ES_Caster using Abilities\Spells\Orc\Shockwave\ShockwaveMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of ES_Target using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of ES_Target using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- --- --------
      • -------- Starting a loop, which runs all the moving special effects --------
      • -------- --- --------
      • For each (Integer A) from 1 to 25, do (Actions)
        • Loop - Actions
          • -------- --- --------
          • -------- This loop runs two special effects at the same time, but by different angle, so don't get confused my two colums of almost same actions --------
          • -------- --- --------
          • -------- --- --------
          • -------- Calculating the values which are calculated trough every loop --------
          • -------- --- --------
          • Set ES_SFX_Value = ((Real((Integer A))) x 13.00)
          • Set ES_SFX_Value_1 = (100.00 - ((Real((Integer A))) x 2.50))
          • Set ES_SFX_Value_2 = ((Real((Integer A))) x 8.00)
          • Set ES_SFX_Value_3 = ((Real((Integer A))) x 3.00)
          • Set ES_SFX_Offset_Calculation = (ES_SFX_Offset - ES_SFX_Value)
          • -------- --- --------
          • -------- Getting a location for special effect --------
          • -------- --- --------
          • Set ES_SFX_Loc_3 = (ES_SFX_Loc offset by ES_SFX_Offset_Calculation towards (ES_Facing_Angle + ES_SFX_Angle) degrees)
          • -------- --- --------
          • -------- Creating the dummy as a special effect, setting its values experation timer/flying height/vertex coloring/ animation --------
          • -------- --- --------
          • Unit - Create 1 Dummy_SFX for ES_Owner at ES_SFX_Loc_3 facing ES_Facing_Angle degrees
          • Unit - Add a ES_SFX_Duration second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Move To ES_Spell_Loc
          • Animation - Change (Last created unit) flying height to ((Current flying height of (Last created unit)) - ES_SFX_Value_2) at 0.00
          • Animation - Play (Last created unit)'s birth animation
          • Animation - Change (Last created unit)'s size to (ES_SFX_Value_1%, ES_SFX_Value_1%, ES_SFX_Value_1%) of its original size
          • Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with ES_SFX_Value_3% transparency
          • -------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
          • -------- --- --------
          • -------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
          • -------- Getting a location for special effect --------
          • -------- --- --------
          • Set ES_SFX_Loc_4 = (ES_SFX_Loc_2 offset by ES_SFX_Offset_Calculation towards (ES_Facing_Angle - ES_SFX_Angle) degrees)
          • -------- --- --------
          • -------- Creating the dummy as a special effect, setting its values experation timer/flying height/vertex coloring/ animation --------
          • -------- --- --------
          • Unit - Create 1 Dummy_SFX for ES_Owner at ES_SFX_Loc_4 facing ES_Facing_Angle degrees
          • Unit - Add a ES_SFX_Duration second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Move To ES_Spell_Loc
          • Animation - Change (Last created unit) flying height to ((Current flying height of (Last created unit)) - ES_SFX_Value_2) at 0.00
          • Animation - Play (Last created unit)'s birth animation
          • Animation - Change (Last created unit)'s size to (ES_SFX_Value_1%, ES_SFX_Value_1%, ES_SFX_Value_1%) of its original size
          • Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with ES_SFX_Value_3% transparency
          • -------- --- --------
          • -------- Clearing the used locations / removing a leaks --------
          • -------- --- --------
          • Custom script: call RemoveLocation(udg_ES_SFX_Loc_3)
          • Custom script: call RemoveLocation(udg_ES_SFX_Loc_4)
      • -------- --- --------
      • -------- Creating a nice floaring text that wil dispay the damage done, also setting its lifespan/color/velectory.. --------
      • -------- --- --------
      • Floating Text - Create floating text that reads ((String((Integer(ES_Total_Damage)))) + !) above ES_Target with Z offset 0.00, using font size 10.00, color (100.00%, 5.00%, 0.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • -------- --- --------
      • -------- Creating a dummy that will Slow/Stun the target --------
      • -------- --- --------
      • Unit - Create 1 Dummy for ES_Owner at ES_Spell_Loc facing Default building facing degrees
      • Unit - Add a 0.75 second Generic expiration timer to (Last created unit)
      • Unit - Make (Last created unit) face ES_Target over 0.00 seconds
      • -------- --- --------
      • -------- This checks which life is higher target's or caster's --------
      • -------- --- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of ES_Caster) Greater than or equal to (Life of ES_Target)
        • Then - Actions
          • -------- --- --------
          • -------- Now if caster's life is higher than target's then dummy is ordered to castslow --------
          • -------- --- --------
          • Unit - Add ES_Dummy_Ability_Slow to (Last created unit)
          • Unit - Set level of ES_Dummy_Ability_Slow for (Last created unit) to ES_Ability_Level
          • Unit - Order (Last created unit) to Human Sorceress - Slow ES_Target
        • Else - Actions
          • -------- --- --------
          • -------- But if caster's life is lower than target's than dummy is ordered to cast storm bolt (stun) --------
          • -------- --- --------
          • Unit - Add Equilibrium Strike(dummy stun) to (Last created unit)
          • Unit - Set level of ES_Dummy_Ability_Stun for (Last created unit) to ES_Ability_Level
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt ES_Target
      • -------- --- --------
      • -------- Damaging the target --------
      • -------- --- --------
      • Unit - Cause ES_Caster to damage ES_Target, dealing ES_Total_Damage damage of attack type Spells and damage type Unknown
      • -------- --- --------
      • -------- Clearing the used locations / removing a leaks --------
      • -------- --- --------
      • Custom script: call RemoveLocation(udg_ES_Spell_Loc)
      • Custom script: call RemoveLocation(udg_ES_Spell_Loc_2)
      • Custom script: call RemoveLocation(udg_ES_SFX_Loc)
      • Custom script: call RemoveLocation(udg_ES_SFX_Loc_2)
SSMC#20-Berz-Equilibrium Strike.w3x is the latest version
 

Attachments

  • Equilibrium Strike.w3x
    51.3 KB · Views: 64
  • SSMC#20-Berz-Equilibrium Strike.w3x
    51.5 KB · Views: 70
Last edited:
Level 22
Joined
Dec 31, 2006
Messages
2,216
Most of the eye-candy is done now, and the alpha version of the physics engine is ready. I might have a WIP ready today.

Btw, for those who don't know which spell I'm making:
I'm creating the Meteor God Power from Age of Mythology, with a slight modification. It's going to be a hero ultimate and slightly less OH MY FUCKING GOD WHAT HAPPENED TO MY BASE?!



Edit: I know it's not much, but I have a screenshot for you. I'm currently at school, which means I can't use Fraps or a similar program to make a video. I will do that when I get home though.

Behold..

attachment.php
 

Attachments

  • derp storm.png
    derp storm.png
    2.3 MB · Views: 228
Last edited:
Level 48
Joined
Apr 18, 2008
Messages
8,421
Awesome, but;
1) The units don't fly that far, nor is the meteor's knockack radius so large.
2) Corpses also fly, if they got killed by the meteor that hit them.
3) There's like 3 more seconds during which meteors rain a lot faster(like yours do in the end).
4) It would be awesome if you could implement some cool "battle music" during the duration of the spell. Just take something from WC3. :p
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I've got some comments:
  • The meteors seem to fall so fast that you don't really absorb the effect of the spell. You could try to re-color some of the Infernal meteor effects and get something that looks good with that.

The other comment was kind of similar, just in regards to the vertical-ness of the meteors falling. The Infernal meteor effect does not have this "vertical-ness" to it but you can give it a shot, see what you think.
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
I've got some comments:
  • The meteors seem to fall so fast that you don't really absorb the effect of the spell. You could try to re-color some of the Infernal meteor effects and get something that looks good with that.

The other comment was kind of similar, just in regards to the vertical-ness of the meteors falling. The Infernal meteor effect does not have this "vertical-ness" to it but you can give it a shot, see what you think.
He made it quite similar to Meteor spell from AoM, meteors fall fast and vertical.
Amazing effect, really.
 

The check the life part in Irelia's skill efficiently, avoid comparing your flat life vs enemy's flat life, because it doesn't make a realistic comparison. You have to check your current like, depending on the maximum life to make a correct check, not this kind of flat comparison. :]
  • Set Life1 = ((Life of (Triggering unit)) / (Max life of (Triggering unit)))
  • Set Life2 = ((Life of (Target unit of ability being cast)) / (Max life of (Target unit of ability being cast)))
  • If (All conditions are true) then do (Actions) else do (Actions)
    • If - Conditions
      • Life1 Less than Life2
    • Then - Actions
      • Unit - Add Storm Bolt to Dummy
      • Unit - Order Dummy to Human Mountain King - Storm Bolt (Target unit of ability being cast)
    • Else - Actions
      • Unit - Add Slow to Dummy
      • Unit - Order Dummy to Human Sorceress - Slow (Target unit of ability being cast)
Alternatively, you could use your Percent Life vs. enemy's Percent life; that's also an option.

Indeed. Going to make a video very soon.

Edit: Finally YouTube is done with the processing. It was supposed to be 720p, but ended up being 480p for some stupid reason.

Reminds me of your Carpet Bomb spell; try another concept, really :p
 
The check the life part in Irelia's skill efficiently, avoid comparing your flat life vs enemy's flat life, because it doesn't make a realistic comparison. You have to check your current like, depending on the maximum life to make a correct check, not this kind of flat comparison. :]
  • Set Life1 = ((Life of (Triggering unit)) / (Max life of (Triggering unit)))
  • Set Life2 = ((Life of (Target unit of ability being cast)) / (Max life of (Target unit of ability being cast)))
  • If (All conditions are true) then do (Actions) else do (Actions)
    • If - Conditions
      • Life1 Less than Life2
    • Then - Actions
      • Unit - Add Storm Bolt to Dummy
      • Unit - Order Dummy to Human Mountain King - Storm Bolt (Target unit of ability being cast)
    • Else - Actions
      • Unit - Add Slow to Dummy
      • Unit - Order Dummy to Human Sorceress - Slow (Target unit of ability being cast)
Alternatively, you could use your Percent Life vs. enemy's Percent life; that's also an option.



Reminds me of your Carpet Bomb spell; try another concept, really :p

Did that, but it bugged for some reason. So I used this method. Maybe i'll try something out nex sunday.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Okay so in that case I've got some suggestions.

If a player's camera is within a certain radius of the meteor, it would be neat if his screen flashed. Also maybe adding some cool effects on the ground when the meteor hits to compliment the effect.

If you shake the camera a bit (again only for players who are viewing) that would also add a significant effect to the collision of the meteor on the ground.

I still can't even think of a spell that I want to make from another video game. I've come across some cool ideas, but nothing that inspires any serious creativity.
 
Level 48
Joined
Apr 18, 2008
Messages
8,421
If a player's camera is within a certain radius of the meteor, it would be neat if his screen flashed. Also maybe adding some cool effects on the ground when the meteor hits to compliment the effect.
Indeed, I was going to suggest that as well.

If you shake the camera a bit (again only for players who are viewing) that would also add a significant effect to the collision of the meteor on the ground.
I'm actually rather skeptical about it, because WC3's "shake camera" effect is rather... Bad. I guess if it shook only for a very brief moment it could work.

Of course, I'm just speaking my mind here. It's all up to TRD to decide obviously. :p
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Well you could code your own "shake camera". You just have to move it back and forth. If the available shake-camera function does not suffice.

The effect I'm trying to describe would be like 3-4 shakes left/right within less than a second. It would add that "oomph" to the spell rather than simply having special effects going off everywhere and units dying. Maybe when the meteor lands you could play the Neutral Building Death to make it look like there is an explosion at the ground-level (while shaking the camera).
 
Level 10
Joined
Jul 12, 2009
Messages
318
I'm actually rather skeptical about it, because WC3's "shake camera" effect is rather... Bad.
Well you could code your own "shake camera". You just have to move it back and forth. If the available shake-camera function does not suffice.
Indeed. If it's of any help, I've made a simple camera-shake trigger that I think looks pretty good:
  • Shake Periodic
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Camera - Shake the camera for (Player((Integer A))) with magnitude Shake
          • Camera - Sway the camera target for (Player((Integer A))) with magnitude Shake and velocity (75.00 x Shake)
      • Set Shake = (Shake x 0.50)
  • Shake Modify
    • Events
      • Game - Shake_Mod becomes Not equal to 0.00
    • Conditions
    • Actions
      • Set Shake = (Max(Shake_Mod, Shake))
      • Set Shake_Mod = 0.00
  • Shake Chat Command
    • Events
      • Player - Player 1 (Red) types a chat message containing -shake as A substring
      • Player - Player 2 (Blue) types a chat message containing -shake as A substring
      • Player - Player 3 (Teal) types a chat message containing -shake as A substring
      • Player - Player 4 (Purple) types a chat message containing -shake as A substring
      • Player - Player 5 (Yellow) types a chat message containing -shake as A substring
      • Player - Player 6 (Orange) types a chat message containing -shake as A substring
      • Player - Player 7 (Green) types a chat message containing -shake as A substring
      • Player - Player 8 (Pink) types a chat message containing -shake as A substring
      • Player - Player 9 (Gray) types a chat message containing -shake as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -shake as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -shake as A substring
      • Player - Player 12 (Brown) types a chat message containing -shake as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -shake on
        • Then - Actions
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Set Shake = 0.00
          • Trigger - Turn on Shake Periodic <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to -shake off
            • Then - Actions
              • Camera - Stop swaying/shaking the camera for (Triggering player)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Trigger - Turn off Shake Periodic <gen>
              • Custom script: endif
            • Else - Actions
All you have to do is set Shake_Mod to a value (usual range is 1-10) and it will automatically shake the camera by that amount for a short, fading duration. I've tuned it to imitate shakes from explosions. It is safe to use local information (eg. camera position) to give different amounts of shake to each player.

Feel free to just co-opt my values into your own shake trigger, if you like.

Maybe when the meteor lands you could play the Neutral Building Death
Judging from the video, this is already the case.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Can the Neutral Building Death be increased in size at all? Perhaps, another idea to try.

Hm. I've got a question related to contest submissions. Is the spell supposed to be a direct imitation of the concept into Warcraft III, or can we morph the concept slightly?

I'm thinking about using Samus' ability from Super Smash Bros where she powers up her arm-cannon and fires a shot. I really couldn't find any videos of this effect but this one kind of captures the idea:

What I was wondering (from my above question) is whether or not I would be able to possibly rename this to "Blaster Cannon" and make some of my own adjustments in detailing the ability. For example, in the Super Smash Bros version of the ability Samus can only fire prematurely if Samus is charging up. If Samus saves the charge for later then upon firing again the charge will continue gaining power. Would I be able to play with the concepts used here or am I to strictly copy the mechanics as they were in the Super Smash Bros game?

Also do I have to imitate the idea that it's an -Arm Cannon-? Can I play with the concept to make it fit in the Warcraft environment more?
 
Last edited:
Level 22
Joined
Dec 31, 2006
Messages
2,216
Can the Neutral Building Death be increased in size at all? Perhaps, another idea to try.

Hm. I've got a question related to contest submissions. Is the spell supposed to be a direct imitation of the concept into Warcraft III, or can we morph the concept slightly?

I'm thinking about using Samus' ability from Super Smash Bros where she powers up her arm-cannon and fires a shot. I really couldn't find any videos of this effect but this one kind of captures the idea:

What I was wondering (from my above question) is whether or not I would be able to possibly rename this to "Blaster Cannon" and make some of my own adjustments in detailing the ability. For example, in the Super Smash Bros version of the ability Samus can only fire prematurely if Samus is charging up. If Samus saves the charge for later then upon firing again the charge will continue gaining power. Would I be able to play with the concepts used here or am I to strictly copy the mechanics as they were in the Super Smash Bros game?

Also do I have to imitate the idea that it's an -Arm Cannon-? Can I play with the concept to make it fit in the Warcraft environment more?
I think you can edit it slightly, but it has to remain very similar to the original spell.

And about my spell:
I'm already using Neutral Building Death, but I could try to scale it. I have also implemented a shake function in vJASS already.
For the flash, well the original spell doesn't have it, but I can add the extra debris that the meteor tosses up in the air.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
From what I can see from the video, where your camera is pretty much focusing directly on the meteor sometimes, there is no extra flash besides the one created by the meteor (which I have already implemented).
Btw, just tried scaling the effect. It works, but it doesn't scale that well, it's more like the boom is spread of a wider area. It looks ok with a 200% size, so I think I'll stick with that.
 
Level 48
Joined
Apr 18, 2008
Messages
8,421
From what I can see from the video, where your camera is pretty much focusing directly on the meteor sometimes, there is no extra flash besides the one created by the meteor (which I have already implemented).
Btw, just tried scaling the effect. It works, but it doesn't scale that well, it's more like the boom is spread of a wider area. It looks ok with a 200% size, so I think I'll stick with that.

Then your flash will have to be much, much bigger, because it IS much bigger in the actual spell. :D
Also, after you implement everything me and Berb told you, all you'll be missing from the actual spell is the shockwave effect, which I'm not sure if you actually can do.
Also would be cool if you made it look different when hitting water(like in the spell), but I dunno if that's possible. :D
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
I could make it different when hitting water, but that would require a lot more constants (obviously different effects when hitting water). I can do the shockwave effect if I can use custom models xD

I could try to find a wc3 model though, but I haven't seen a model with a shockwave only. I found one which has shockwave and flash, but it also had an explosion which didn't fit.

Edit: Btw, the flash size has been slightly increased, and it's easy to make it bigger/smaller. It's one of the many constants ^^
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I think you can edit it slightly, but it has to remain very similar to the original spell.

Eh I don't know how likeable Samus' arm-cannon is going to be once implemented into Warcraft. It would be cool if we were allowed to morph the presentation of the ability while preserving the concept behind it, but under certain circumstances I could see how that can completely re-mask a spell.

I may just have to find yet another idea for this. I don't play a whole lot of video games so my spectrum is kind of short and stubby. I can usually be creative with spell themes but having to steal an entire production of a spell from another game seems so restrictive. Could just be me. Not trying to complain or suggest different contest rules, maybe just not my contest.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Implode looks pretty sweet, though I fear it would be tremendously difficult to find special effects within Warcraft III that make it look good. I was also looking at Tornado, figured nobody has really made a cool Tornado spell that actually picks up debris so maybe I'll try that one out.

Lightning Storm seemed kind of generic, just zapping units hear and there and starting a small fire. Thanks for the advice.

Are there any other games you recommend looking at? I've tried searching for random video game spell abilities but it's really hard to find anything helpful on YouTube, hell I could barely find a video that depicted Samus' arm-cannon from Super Smash Bros.
 
Level 48
Joined
Apr 18, 2008
Messages
8,421
Lightning Storm actually hits units dead-on, with exact accuracy, one-shotting them. It has a very small chance that a lightning actually misses and hits far away.

Well... You could always try some Battle for Middle Earth game. If I recall, I actually played one of those, and they had very cool spells. I guess you could try something from SC2 as well. I didn't play too many games myself. :X
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
The death animation of Freezing Breath <Missile> is a nice shockwave, as is Wisp <Special>.

Not exactly the kind of shockwave I'm looking for, but thanks for trying.

@Berb, try to find a spell from Final Fantasy, or maybe Dragon Age/Skyrim/Oblivion/Morrowind. You could also try something like a Star Wars spell (TEH FORCE!).
 
Last edited:
Level 22
Joined
Dec 31, 2006
Messages
2,216
Sorry to hear that. I dunno when the next one will be though.

Anyway, I've gotten into some trouble..
I've hit a bug which has been hiding for a long time. Apparently one of my effects (only 1 of many) appear at a slightly incorrect location even though it's given the same coordinates as the other effects which actually appear where they should. I didn't change any piece of code that had anything to do with the coordinates. I've only done some minor optimizations in other libraries. And yes, I know it was working earlier today.

Basically, it's this part which is fucked up (Pay extra attention to the coordinates they are given):
JASS:
        .
            //All these effects turn up in the right spot
            loop
                exitwhen i>METEOR_START_HEIGHT/METEOR_SMOKE_SPREAD
                call DestroyEffect(AddSpecialEffectZ(METEOR_SMOKE_EFFECT, x, y, lz+METEOR_START_HEIGHT-METEOR_SMOKE_SPREAD*i))
                set i = IncVal(i)
            endloop

            //This son of a bitch ends up in the wrong spot, but it has the same coordinates (x,y) as all the other effects.
            call DestroyEffect(AddSpecialEffectZ(METEOR_IMPACT_EFFECT   , x, y, lz))

            //All of these are fine.
            call CreateTimedEffect(              METEOR_IMPACT_EFFECT_2 , x, y, 0, 2,                       6,                      0, true)
            call CreateTimedEffect(              METEOR_FLASH_EFFECT    , x, y, 0, METEOR_FLASH_SIZE*1.5,   6,                      0, true)
            call CreateTimedEffect(              METEOR_FLASH_EFFECT    , x, y, 0, METEOR_FLASH_SIZE,       6,                      0, true)
            call CreateTimedEffect(              METEOR_FIRE_EFFECT     , x, y, 0, 1,                       METEOR_FIRE_DURATION,   4, false)
I've added tabbing to make the code readable

Edit: Oh yeah, screenshot:

attachment.php

 

Attachments

  • FFFUUUU.png
    FFFUUUU.png
    4 MB · Views: 201
Level 18
Joined
Jan 21, 2006
Messages
2,552
What does AddSpecialEffectZ do? There might be something in there causing this problem. I doubt its the timed-effect library, because I'm pretty sure that it just associates a timer with an effect and kills the effect on expiration.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
AddSpecialEffectZ is basically regular AddSpecialEffect only it creates an invisible platform 'OTip' (or was it 'OTis') beneath it. This allows you to create special effects in the air.
The platform is destroyed immediately after. I don't think there's a problem with AddSpecialEffectZ though, as the smoke trail (the loop thing) works perfectly.

And yes, the timed effect is a unit+effect (added a unit so I can scale the effects) and a timer. The unit has no collision and I don't think having collision would affect AddSpecialEffectZ. Last time I checked, effects don't care about pathability xD

Edit: Here's the AddSpecialEffectZ library:
JASS:
library SpecialEffectZ

    globals
        private destructable d
    endglobals
    
    function AddSpecialEffectZ takes string s, real x, real y, real z returns effect
        set d = CreateDestructableZ('OTip', x, y, z, 0., 1, 0)
        set bj_lastCreatedEffect = AddSpecialEffect(s, x, y)
        call RemoveDestructable(d)
        return bj_lastCreatedEffect
    endfunction
endlibrary

Edit: Found an old version of the spell. The difference between the two (the old and working vs new and malfunctioning) is that instead of "IncVal(i)" which is an array lookup, the old one does "i = i + 1" (which is more common, but slower). Also, in the old one there's 1 less effect (The extra effect in the new version is another timed effect) and the "METEOR_IMPACT_EFFECT_2" is not scaled, so it's just an AddSpecialEffectZ. The "METEOR_IMPACT_EFFECT_2" is working fine in both versions.

Btw, when I come to think about it, I don't understand why I used AddSpecialEffectZ on the ground effects xD



Edit again :D
I wonder if this is some retard bug inherent in JASS. I have experienced some really stupid bugs in JavaScript many times, where a parameter goes from being one thing to another in the middle of the script. And sometimes the parameter would be undefined unless you do something with it. An example would be a function simply doing "return <param>*<some numbers and blabla>". It returned undefined even if the param was an actual number. UNTIL, I added "<param>;" before the return part.
An example is worth more than a thousand words:
Code:
function foobar(i) {
    <derp derp, do some stuff. Maybe some if checks and whatnot>
    return i * <some number>;
}
That script would have returned undefined in some cases. It's really annoying, because the script is fine.
This is rare though, but it has happened to me. The obvious step is to debug. Perhaps print the value of "i" to the screen like this:
Code:
function foobar(i) {
    <derp derp, do some stuff. Maybe some if checks and whatnot>
    alert(i);
    return i * <some number>;
}
This code would print the value of "i" to your screen and it would ALSO return the CORRECT value. No longer undefined. Removing the "alert(i)" makes the script bug again, but simply doing this works as well:
Code:
function foobar(i) {
    <derp derp, do some stuff. Maybe some if checks and whatnot>
    i; // Lol what the fuck
    return i * <some number>;
}
Great, isn't it?
 
Last edited:
Status
Not open for further replies.
Top