[Spell] Triple Wave
3 participantes
Página 1 de 1
[Spell] Triple Wave
Descrição da Spell:
Lança três ondas de água em uma direção, causando danos á todos os inimigos atingidos no caminho.
Plataforma da Spell:
vJass
Requisitos:
JNGP (Jass New Generation Pack)
Setup (JESP):
Corpo do Script:
Download (Demo Map)
- Open Source: pode ser aberto no World Editor.
JNGP (Link Externo)
- Página de download da ferramenta
- Instruções de uso e instalação na página de download (inglês).
Lança três ondas de água em uma direção, causando danos á todos os inimigos atingidos no caminho.
Plataforma da Spell:
vJass
Requisitos:
JNGP (Jass New Generation Pack)
Setup (JESP):
- Código:
module TripleWave_Setup
public static constant method DUMMY_RAWCODE takes nothing returns integer
return 'dumm'
endmethod
public static constant method SPELL_RAWCODE takes nothing returns integer
return 'A000'
endmethod
public static constant method DUMMY_SPELL_RAWCODE takes nothing returns integer
return 'A001'
endmethod
endmodule
Corpo do Script:
- Código:
struct TripleWave extends array
implement TripleWave_Setup
private static method AngleAB takes location whichLocA,location whichLocB returns real
local location a = whichLocA
local location b = whichLocB
local real r = 180. / 3.14159 * Atan2(GetLocationY(b) - GetLocationY(a),GetLocationX(b) - GetLocationX(a))
call RemoveLocation(a)
call RemoveLocation(b)
set a = null
set b = null
return r
endmethod
private static method ProjectionX takes real realX,real whichDist,real whichAngle returns real
local real x = realX + whichDist * Cos(whichAngle * 3.14159 / 180.)
return x
endmethod
private static method ProjectionY takes real realY,real whichDist,real whichAngle returns real
local real y = realY + whichDist * Sin(whichAngle * 3.14159 / 180.)
return y
endmethod
private static method checkSpell takes nothing returns nothing
local unit u = null
local player p = null
local integer i = 0
local integer l = 0
local real x = 0.
local real y = 0.
local unit d = null
local location l1 = null
local location l2 = null
local real array xa
local real array ya
if GetSpellAbilityId()==SPELL_RAWCODE() then
set u = GetTriggerUnit()
set p = GetOwningPlayer(u)
set i = GetUnitAbilityLevel(u,GetSpellAbilityId())
set x = GetUnitX(u)
set y = GetUnitY(u)
set l1 = Location(x,y)
set l2 = GetSpellTargetLoc()
/*set xa[0] = ProjectionX(x,60.,AngleAB(l1,l2)+30)
set xa[1] = ProjectionX(x,60.,AngleAB(l1,l2)-30)
set ya[0] = ProjectionY(y,60.,AngleAB(l1,l2)+30)
set ya[1] = ProjectionY(y,60.,AngleAB(l1,l2)-30)*/
set xa[0] = ProjectionX(x,60.,GetUnitFacing(u)+30)
set xa[1] = ProjectionX(x,60.,GetUnitFacing(u)-30)
set ya[0] = ProjectionY(y,60.,GetUnitFacing(u)+30)
set ya[1] = ProjectionY(y,60.,GetUnitFacing(u)-30)
loop
set d = CreateUnit(p,DUMMY_RAWCODE(),x,y,GetUnitFacing(u))
call UnitApplyTimedLife(d,'BTLF',1.25)
call UnitAddAbility(d,DUMMY_SPELL_RAWCODE())
call SetUnitAbilityLevel(d,GetSpellAbilityId(),i)
call IssuePointOrder(d,"carrionswarm",xa[l],ya[l])
set d = null
set l = l + 1
exitwhen l == 2
endloop
call RemoveLocation(l2)
call RemoveLocation(l1)
set p = null
endif
set u = null
endmethod
private static method onInit takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(i),ConvertPlayerUnitEvent(274),null)
set i = i + 1
exitwhen i == 12
endloop
call TriggerAddAction(t,function thistype.checkSpell)
set t = null
endmethod
endstruct
Download (Demo Map)
- Open Source: pode ser aberto no World Editor.
JNGP (Link Externo)
- Página de download da ferramenta
- Instruções de uso e instalação na página de download (inglês).
Re: [Spell] Triple Wave
gostei, bem feito, fluido e não parece apresentar falhas, pena que não estou em casa, gostaria de testar
Re: [Spell] Triple Wave
Gostei, simples e pratico. O Único problema é que eu não entendo nada de jass ou vjass =/ eu gostaria muito de aprender.
Re: [Spell] Triple Wave
Pra aprender é só observar. Você é mestre em GUI, eu vi em outro post.
Tudo o que têm que fazer é converter tudo o que você faz pra custom text. Só pra aprender as funções primeiro.
O restante vem com o tempo.
")
Tudo o que têm que fazer é converter tudo o que você faz pra custom text. Só pra aprender as funções primeiro.
O restante vem com o tempo.
")
Re: [Spell] Triple Wave
tenta fazer uma versão GUI '0'
@off
o negocio é que vjass é programação MERRRMO com orientação a objeto e tudo mais so temos q quebrar esse formato de gui para programarmos de verdade, é rápido de se acostumar relaxem
@off
o negocio é que vjass é programação MERRRMO com orientação a objeto e tudo mais so temos q quebrar esse formato de gui para programarmos de verdade, é rápido de se acostumar relaxem
Tópicos semelhantes
» [Spell] Zombie Wave
» (Spell Igui)Cold Feet,a spell do ancient do dota
» [Pedido de Spell] Preciso de uma Spell para meu map.
» [Spell] Toxic Laser Spell
» [Spell Pack] Hidan Spell Pack
» (Spell Igui)Cold Feet,a spell do ancient do dota
» [Pedido de Spell] Preciso de uma Spell para meu map.
» [Spell] Toxic Laser Spell
» [Spell Pack] Hidan Spell Pack
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|