- Joined
- Nov 6, 2008
- Messages
- 8,316
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Special Effect - Create a special effect at (Position of (Attacking unit)) using Abilities\Weapons\Bolt\BoltImpact.mdl
Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 180.00 at (Position of (Target unit of ability being cast)), dealing (45.00 + (10.00 x (Real((Level of Earth Strike for (Casting unit)))))) damage of attack type Magic and damage type Normal
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Unit - Create 1 Deep Elemental for Player 1 (Red) at loc facing (X of (Position of (Casting unit))) degrees
Special Effect - Create a special effect at (Position of (Last created unit)) using war3mapImported\AquaSpike.mdx
Special Effect - Create a special effect at (Position of (Dying unit)) using war3mapImported\AquaSpike.mdx
Unit - Cause (Dying unit) to damage circular area after 0.00 seconds of radius 500.00 at (Position of (Dying unit)), dealing 75.00 damage of attack type Magic and damage type Cold
Set Point1 = (Position of (Triggering unit))
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 500.00 of (Point) matching ((Matching unit) belongs to an enemy of (Owner of (Triggering unit)) Equal to True) and do (Actions)

Loop - Actions


Unit - Cause (Triggering unit) to damage (Picked unit) dealing 300.00 damage of attack type Spells and damage type Normal
Custom script: call RemoveLocation (udg_Point1)
((Matching unit) belongs to an enemy of (Owner of (Triggering unit))
(Owner of (Matching unit)) Equal to (Random player from (All enemies of (Owner of (Triggering unit))))
It`s unit comparision((Matching unit) belongs to an enemy of (Owner of (Triggering unit))
(Matching unit) Equal to (Random unit from (Units owned by (Random player from (All enemies of (Owner of (Triggering unit))))))
You think that by converting your GUI trigger into Custom script will actually enhance your coding "look"? It's so easy to understand that that custom script is conversion. Now provide us with your GUI function, because you'll receive a really low score in Coding.
I love your Tsunami spell by the way; the morph animation gives it a great twist, no matter how simple the spell is.
It`s unit comparision
Unit-belongs to an enemy of player (or smth like that)
((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True
Can't you do player comparison - Owner of <unit> is an enemy of owner of <unit>
(Owner of (Triggering unit)) Equal to (Owner of (Target unit of ability being cast))
It returns a player, not a boolean.
Please merge your 2 posts, you just double posted. I write this to make you avoid trouble with moderators.
I couldn't find the apropriate skillset for my original hero model which was the WC3 faceless terror.
@Ronojales:
Are you submitting them to the Icons section? If not, then yes they are alright.
Hmm, I think there`ll be. There are pretty many contesants and some of them are really good coders so I`m pretty sure of this.I hope to see some innovative skills in this contest ^^
Anyway my new skillset icons should look like this now(i may change the 2nd icon though):
:O
Funcom is a Norwegian company
Post more WIP's guys![]()
scope HydroSpheres initializer init
globals
//RAWCODE STUFF
private constant integer Spell_ID = 'A002'
//rawcode of the spell
private constant integer Dummy_ID = 'e000'
//rawcode of the dummy unit
private constant integer Locust_ID = 'Aloc'
//rawcode of the locust spell
private constant integer Dummy_Height_Enabler = 'Amrf'
//allows modification of the dummy's flying height
private constant integer Hero_ID = 'H000'
//rawcode of the hero's normal form
private constant integer Avatar_ID = 'H001'
//rawcode of the hero's alternate form
//DAMAGE / MANA STUFF
private constant real DPS = 5.0
//starting damage per second
private constant real DPSinc = 1.0
//damage increases by this vaule per second
private constant real mana = 50.0
//mana drain when spheres detonate
private constant real manaInc = 0.0
//increase of mana drain per level (not used in the hero), put here for more config options
private constant real drain = 0.3
// % of mana restored to the hero (0,3 = 30%)
private constant real drainInc = 0.0
//increase of mana restored per level (not used in the hero), put here for more config options
//VISUAL STUFF
private constant integer spheres = 3
//starting number of spheres
private constant integer sInc = 1
//increase of spheres per level
private constant integer uInc = 2
//how many spheres are added (ultimate form)
private constant string mdlPath = "Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl"
//model path of the spheres
private constant real rad = 125.0
//radius of the sphere circle
private constant real z = 30.0
//z height of the dummy unit
//ANIMATION STUFF
private constant real animTimer = 1.0
//duration of the animation
private constant string Anim = "spell"
//animation played
private constant integer A_red = 255
private constant integer A_green = 255
private constant integer A_blue = 255
private constant integer A_alpha = 95
//vaules for the RGBA colors of the avatar that appears
private constant real fdTime = 0.06
//fade timer period for the avatar
//MOVEMENT STUFF
private constant real mTimer = 0.025
//timer period for the movement of the spheres
private constant real dist = 25.0
//distance in WC3 units moved every mTimer period
private constant real aDist = 5.0
//angle in degrees moved every mTimer period
endglobals
//calculates damage per second
private constant function DamagePS takes integer time returns real
return DPS + DPSinc * time
endfunction
//calculates the mana drained according to level
private constant function Mana takes integer level returns real
return mana + manaInc * (level - 1)
endfunction
//calculates the mana restored according to level
private constant function Drain takes integer level returns real
return drain + drainInc * (level - 1)
endfunction
//calculates how many spheres are spawned
private function Spheres takes integer level, boolean ultimate returns integer
if ultimate == true then
return spheres + sInc * (level - 1) + uInc
else
return spheres + sInc * (level - 1)
endif
endfunction
//****************************************************************************************
//****************************************************************************************
//******************************* END OF SETUP SECTION ***********************************
//****************************************************************************************
//****************************************************************************************
globals
private Table Tab
endglobals
private struct Data
unit caster
unit target
unit avatar
unit dummy
boolean exists
integer counter
integer time
real t
real mn
real dr
integer array id [8190]
real x
real y
endstruct
private struct SData
effect sfx
unit dummy
real angl
method onDestroy takes nothing returns nothing
call DestroyEffect(sfx)
call KillUnit(dummy)
endmethod
endstruct
private struct FD
integer alpha
unit avt
static method create takes integer a, unit avt returns FD
local FD Fade = FD.allocate()
set Fade.alpha = a
set Fade.avt = avt
return Fade
endmethod
endstruct
//****************************************************************************************
private function Conditions takes nothing returns boolean
return GetSpellAbilityId()==Spell_ID
endfunction
//****************************************************************************************
private function FadeAvatar takes nothing returns nothing
local timer T = GetExpiredTimer()
local FD Fade = FD(GetTimerData(T))
set Fade.alpha = Fade.alpha - 5
if Fade.alpha == 0 then
call RemoveUnit(Fade.avt)
call Fade.destroy()
call ReleaseTimer(T)
else
call SetUnitVertexColor(Fade.avt, A_red, A_green, A_blue, Fade.alpha)
endif
endfunction
private function MLoop takes nothing returns nothing
local timer t = GetExpiredTimer()
local Data D = Data(GetTimerData(t))
local integer countMax = D.counter
local real dmg
local boolean du = false
local integer id
local SData SD
local real x = GetUnitX(D.dummy)
local real y = GetUnitY(D.dummy)
local real oX
local real oY
local real tX = GetUnitX(D.target)
local real tY = GetUnitY(D.target)
local real dX = tX - x
local real dY = tY - y
local real dbp = SquareRoot(dX * dX + dY * dY)
local real angl = Atan2(tY - y, tX - x)
if dbp <= dist + 20.0 then
call SetUnitX(D.dummy, tX)
call SetUnitY(D.dummy, tY)
set du = true
else
call SetUnitX(D.dummy, (x + dist * Cos(angl)))
call SetUnitY(D.dummy, (y + dist * Sin(angl)))
endif
set D.t = D.t + mTimer
loop
exitwhen D.counter == 0
set id = D.id[D.counter]
set SD = Tab[id]
set oX = GetUnitX(SD.dummy)
set oY = GetUnitY(SD.dummy)
set SD.angl = SD.angl + aDist
call SetUnitX(SD.dummy, (x + rad * Cos(SD.angl * bj_DEGTORAD)))
call SetUnitY(SD.dummy, (y + rad * Sin(SD.angl * bj_DEGTORAD)))
set D.counter = D.counter - 1
endloop
set D.counter = countMax
endfunction
private function Start takes nothing returns nothing
local timer T = GetExpiredTimer()
local Data D = Data(GetTimerData(T))
local FD Fade
local timer t
local timer mt = CreateTimer()
local location loc = Location(D.x, D.y)
local SData SD
local real x
local real y
local integer countMax
local unit u
if D.exists == true then
set Fade = FD.create(A_alpha, D.avatar)
set t = CreateTimer()
call SetTimerData(t, integer(Fade))
call TimerStart(t, fdTime, true, function FadeAvatar)
endif
set u = CreateUnitAtLoc(GetOwningPlayer(D.caster), Dummy_ID, loc, 0.0)
call UnitAddAbility(u, Locust_ID)
call UnitAddAbility(u, Dummy_Height_Enabler)
call UnitRemoveAbility(u, Dummy_Height_Enabler)
call SetUnitFlyHeight(u, z, 0)
set D.dummy = u
set countMax = D.counter
loop
exitwhen D.counter == 0
set x = D.x + rad * Cos(((360/countMax)*D.counter) * bj_DEGTORAD)
set y = D.y + rad * Sin(((360/countMax)*D.counter) * bj_DEGTORAD)
set loc = Location(x, y)
set SD = SData.create()
set SD.dummy = CreateUnitAtLoc(GetOwningPlayer(D.caster), Dummy_ID, loc, 0.0)
set SD.angl = ((360/countMax)*D.counter)
call UnitAddAbility(SD.dummy, Locust_ID)
call UnitAddAbility(SD.dummy, Dummy_Height_Enabler)
call UnitRemoveAbility(SD.dummy, Dummy_Height_Enabler)
call SetUnitFlyHeight(SD.dummy, z, 0)
set SD.sfx = AddSpecialEffectTarget(mdlPath, SD.dummy, "origin")
set Tab[GetHandleId(SD.dummy)]=integer(SD)
set D.id[D.counter]=GetHandleId(SD.dummy)
set D.counter = D.counter - 1
endloop
set D.counter = countMax
call SetTimerData(mt, integer(D))
call TimerStart(mt, mTimer, true, function MLoop)
call ReleaseTimer(T)
set t = null
set T = null
set mt = null
set u = null
endfunction
private function Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local integer level = GetUnitAbilityLevel(caster, Spell_ID)
local unit A
local Data D = Data.create()
local timer t = CreateTimer()
set D.caster = caster
set D.target = target
set D.mn = Mana(level)
set D.dr = Drain(level)
set D.x = GetUnitX(caster)
set D.y = GetUnitY(caster)
if GetUnitTypeId(caster)==Hero_ID then
set D.counter = Spheres(level, false)
set A = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), Avatar_ID, GetUnitX(caster), GetUnitY(caster), GetUnitFacing(caster))
call SetUnitColor(A, GetPlayerColor(GetOwningPlayer(caster)))
call SetUnitX(A, GetUnitX(caster))
call SetUnitY(A, GetUnitY(caster))
call UnitAddAbility(A, Locust_ID)
call SetUnitVertexColor(A, A_red, A_green, A_blue, A_alpha)
call SetUnitAnimation(A, Anim)
set D.avatar = A
set D.exists = true
call SetTimerData(t, integer(D))
call TimerStart(t, animTimer, false, function Start)
else
set D.counter = Spheres(level, true)
call SetTimerData(t, integer(D))
call TimerStart(t, 0.0, false, function Start)
endif
set t = null
set A = null
set caster = null
set target = null
endfunction
//****************************************************************************************
private function init takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(trig, Condition(function Conditions))
call TriggerAddAction(trig, function Actions)
set Tab = Table.create()
set trig = null
endfunction
endscope
It's quite late now so I'm not able to do a really thorough check, but I noticed you use CreateUnitAtLoc() and there's no point in using that. Just use CreateUnit() and use the coordinates you used to create the location in the first place![]()
Oh another ice/water hero
Anachron also is making one, seems that ice is really popular.

Hmm,I'll surely be a death-metal elf ?
This is an interesting theme , as long as I come up with a clear image about myself![]()

He is a traveler, a goblin who not likes technology and choose to live with nature. In nature he found his destiny, to be a protector of nature, by learning to be a dragon master. He's technique and strength is powerful. With the power of Rave stone, He become a great dragon master with charismatic power, and give a name to himself, "The-Rave"
Haha, take a look at my idea:Oh another ice/water hero
Anachron also is making one, seems that ice is really popular.
