- Joined
- May 14, 2011
- Messages
- 524
goin smoothly i see,great job :x
//----------------------------------------------------------------------------------
//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
Trolol hotkey doesn't work.
That's pretty sweet man! Good work
can we use systems from the hive?
5. No imported material, beyond the dummy.mdx model by Vex and Anitarf.
10. vJass users, you may use other libraries to complement your code, some useful examples:
TimerUtils
UnitIndexer
DamageEvent
Table
trolololWoopsy daisy, I forgot to say that that's actually Klingo's spell.
![]() | 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. |
could you put the image inside a hidden tag?
Trolol hotkey doesn't work.
Indeed. Going to make a video very soon.Yeah that screenshot isn't very interesting, we can just see some fire.
He made it quite similar to Meteor spell from AoM, meteors fall fast and vertical.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.
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.
Hi all my name vivian i come from florida happy to meet all here thankyou
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. :]
Alternatively, you could use your Percent Life vs. enemy's Percent life; that's also an option.
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)
Reminds me of your Carpet Bomb spell; try another concept, really![]()
Hello vivian.
Would you like to join the contest? The deadline's pretty close, though.
That's a bot bro
Reminds me of your Carpet Bomb spell; try another concept, really![]()
Indeed, I was going to suggest that as well.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.
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.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.
Indeed. If it's of any help, I've made a simple camera-shake trigger that I think looks pretty good: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.
Judging from the video, this is already the case.Maybe when the meteor lands you could play the Neutral Building Death
I think you can edit it slightly, but it has to remain very similar to the original spell.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?
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.
I don't like you, rules.5. No imported material, beyond the dummy.mdx model by Vex and Anitarf.
I think you can edit it slightly, but it has to remain very similar to the original spell.
I could try to find a wc3 model though, but I haven't seen a model with a shockwave only.
The death animation of Freezing Breath <Missile> is a nice shockwave, as is Wisp <Special>.
.
//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)
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.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
function foobar(i) {
<derp derp, do some stuff. Maybe some if checks and whatnot>
return i * <some number>;
}
function foobar(i) {
<derp derp, do some stuff. Maybe some if checks and whatnot>
alert(i);
return i * <some number>;
}
function foobar(i) {
<derp derp, do some stuff. Maybe some if checks and whatnot>
i; // Lol what the fuck
return i * <some number>;
}