(Spell Igui)Cold Feet,a spell do ancient do dota
2 participantes
Página 1 de 1
(Spell Igui)Cold Feet,a spell do ancient do dota
bom galera essa e minha primeira spell em igui,eu resolvi fazer a spell do ancient apparition do dota,aquela Cold Feet que fica causando dano a cada 1.50 segundos no alvo dura 4.50 segundo e no fim congela o alvo por 2 segundo,mas que se voce ficar muito longe dela ela e cancelada,nao estou usando os modelo de efeito e nem do char mas a spell faz a mema coisa,nao sei se a spell ta 100% mas ta dahora(eu espero) mas essa spell so vai abri pra quem tem igui,que e uma ferramenta que eh muiiiiiiiiiiitoooo util,principalmente por que ela tem wait sem leak entre outros,eu sugiro baixar vo ate da um mini tuto aq link mapa: http://www.epicwar.com/maps/231852/
baixa o igui,extraia os arquivos, e la tera uma pasta com UI,se nao tiver coloque o nome UI,copie ela e coloca pasta warcraft ai e so abri seu mapa...colar essa codigo aq la no cabecario do mapa
function AutoDestroyGroup takes nothing returns nothing
set bj_wantDestroyGroup = true
endfunction
function AutoDestroyEffectLoc takes location where, string modelName returns nothing
call DestroyEffect(AddSpecialEffectLoc(modelName,where))
endfunction
function AutoDestroyEffectUnit takes string attachPointName, widget targetWidget, string modelName returns nothing
call DestroyEffect(AddSpecialEffectTarget(modelName,targetWidget,attachPointName))
endfunction
function AutoFloat takes string texto, location point, real altura, real tamanho, real R, real G, real B, real transparencia, boolean permanente, real velocidade, real angulo, real duracao, real fading returns nothing
call CreateTextTagLocBJ( texto, point, altura, tamanho, R, G, B, transparencia )
call SetTextTagPermanent( bj_lastCreatedTextTag, permanente )
call SetTextTagVelocityBJ( bj_lastCreatedTextTag, velocidade, angulo )
call SetTextTagLifespan( bj_lastCreatedTextTag, duracao )
call SetTextTagFadepoint( bj_lastCreatedTextTag, fading )
endfunction
function EventChat takes trigger t, string s, boolean b returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerChatEvent(t, Player(i), s, b )
set i = i + 1
endloop
endfunction
function EventESC takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t, Player(i), EVENT_PLAYER_END_CINEMATIC)
set i = i + 1
endloop
endfunction
function EventSelect takes trigger t, boolean b returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerSelectionEventBJ(t,Player(i),b )
set i = i + 1
endloop
endfunction
function EventKey takes trigger t, integer a, integer b returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerKeyEventBJ(t,Player(i),a,b)
set i = i + 1
endloop
endfunction
function EventResource takes trigger t, playerstate a, limitop b, real c returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerStateEvent(t,Player(i),a,b,c)
set i = i + 1
endloop
endfunction
function EventVictory takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t,Player(i),EVENT_PLAYER_VICTORY)
set i = i + 1
endloop
endfunction
function EventDefeat takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t,Player(i),EVENT_PLAYER_DEFEAT)
set i = i + 1
endloop
endfunction
function EventLeave takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t, Player(i), EVENT_PLAYER_LEAVE)
set i = i + 1
endloop
endfunction
function PolledWaitNoLeak takes real duration returns nothing
local timer t
local real timeRemaining
if (duration > 0) then
set t = CreateTimer()
call TimerStart(t, duration, false, null)
loop
set timeRemaining = TimerGetRemaining(t)
exitwhen timeRemaining <= 0
if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then
call TriggerSleepAction(0.1 * timeRemaining)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
call DestroyTimer(t)
endif
set t = null
endfunction
Coloca isto aqui do seu mapa
ai e so salva o mapa fecha e abri dnv e pronto te ajuda mt ^^
Feito por:Victor ;D
off(to postandocomo instala pq mta gente presisa mas n instala ^^)
voltando ao assunto,espero que gostem da spell =D
baixa o igui,extraia os arquivos, e la tera uma pasta com UI,se nao tiver coloque o nome UI,copie ela e coloca pasta warcraft ai e so abri seu mapa...colar essa codigo aq la no cabecario do mapa
function AutoDestroyGroup takes nothing returns nothing
set bj_wantDestroyGroup = true
endfunction
function AutoDestroyEffectLoc takes location where, string modelName returns nothing
call DestroyEffect(AddSpecialEffectLoc(modelName,where))
endfunction
function AutoDestroyEffectUnit takes string attachPointName, widget targetWidget, string modelName returns nothing
call DestroyEffect(AddSpecialEffectTarget(modelName,targetWidget,attachPointName))
endfunction
function AutoFloat takes string texto, location point, real altura, real tamanho, real R, real G, real B, real transparencia, boolean permanente, real velocidade, real angulo, real duracao, real fading returns nothing
call CreateTextTagLocBJ( texto, point, altura, tamanho, R, G, B, transparencia )
call SetTextTagPermanent( bj_lastCreatedTextTag, permanente )
call SetTextTagVelocityBJ( bj_lastCreatedTextTag, velocidade, angulo )
call SetTextTagLifespan( bj_lastCreatedTextTag, duracao )
call SetTextTagFadepoint( bj_lastCreatedTextTag, fading )
endfunction
function EventChat takes trigger t, string s, boolean b returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerChatEvent(t, Player(i), s, b )
set i = i + 1
endloop
endfunction
function EventESC takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t, Player(i), EVENT_PLAYER_END_CINEMATIC)
set i = i + 1
endloop
endfunction
function EventSelect takes trigger t, boolean b returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerSelectionEventBJ(t,Player(i),b )
set i = i + 1
endloop
endfunction
function EventKey takes trigger t, integer a, integer b returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerKeyEventBJ(t,Player(i),a,b)
set i = i + 1
endloop
endfunction
function EventResource takes trigger t, playerstate a, limitop b, real c returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerStateEvent(t,Player(i),a,b,c)
set i = i + 1
endloop
endfunction
function EventVictory takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t,Player(i),EVENT_PLAYER_VICTORY)
set i = i + 1
endloop
endfunction
function EventDefeat takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t,Player(i),EVENT_PLAYER_DEFEAT)
set i = i + 1
endloop
endfunction
function EventLeave takes trigger t returns nothing
local integer i
set i = 0
loop
exitwhen i > 12
call TriggerRegisterPlayerEvent(t, Player(i), EVENT_PLAYER_LEAVE)
set i = i + 1
endloop
endfunction
function PolledWaitNoLeak takes real duration returns nothing
local timer t
local real timeRemaining
if (duration > 0) then
set t = CreateTimer()
call TimerStart(t, duration, false, null)
loop
set timeRemaining = TimerGetRemaining(t)
exitwhen timeRemaining <= 0
if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then
call TriggerSleepAction(0.1 * timeRemaining)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
call DestroyTimer(t)
endif
set t = null
endfunction
Coloca isto aqui do seu mapa
ai e so salva o mapa fecha e abri dnv e pronto te ajuda mt ^^
Feito por:Victor ;D
off(to postandocomo instala pq mta gente presisa mas n instala ^^)
voltando ao assunto,espero que gostem da spell =D
Joker- Número de Posts : 447
Data de inscrição : 03/08/2012
Reputação : 62 Pontos : 26098
Re: (Spell Igui)Cold Feet,a spell do ancient do dota
Funções "Wait" não causam leak. A diferença da função "Wait" normal (TriggerSleepAction), pra função "Wait" improved (PolledWait), é que a duração da normal é estática (constante). Já a PolledWait pode ser tanto estática quanto dinâmica (pode checar condições de qualquer tipo á cada 0.10 segundos).
A função PolledWait é principalmente utilizada para calcular dinamicamente a razão distância (alvo)/velocidade (projétil).
A função "Wait" comum deve ser utilizada sempre que o intervalo desejado for constante, já que a PolledWait é uma função BJ.
OBS: Funções BJ são funções que executam um leque de outras funções por tráz dos panos, assim digamos.
Quando o editor compila a função Wait comum, o seguinte código é gerado:
Mas quando o editor compila a função PolledWait, o código gerado é o seguinte:
Podemos deduzir, que não só a função PolledWait, como qualquer outra função BJ, devem ser evitadas ao máximo pois geram grande quantidade de códigos, afetando não só a qualidade mas também o desempenho de seu jogo.
Agora que já sabe o que é uma função BJ (funções na cor vermelha), converta algumas de suas triggers para o formato custom text (jass) e veja o monstro que você está criando em forma de mapa.
Tudo isso é só uma noção básica para um bom programador de triggers.
Espero que seja útil. ")
---
Puts... Quase esqueço de dizer que seu mapa demo não abriu aqui. Abraço.
A função PolledWait é principalmente utilizada para calcular dinamicamente a razão distância (alvo)/velocidade (projétil).
A função "Wait" comum deve ser utilizada sempre que o intervalo desejado for constante, já que a PolledWait é uma função BJ.
OBS: Funções BJ são funções que executam um leque de outras funções por tráz dos panos, assim digamos.
Quando o editor compila a função Wait comum, o seguinte código é gerado:
Mas quando o editor compila a função PolledWait, o código gerado é o seguinte:
Podemos deduzir, que não só a função PolledWait, como qualquer outra função BJ, devem ser evitadas ao máximo pois geram grande quantidade de códigos, afetando não só a qualidade mas também o desempenho de seu jogo.
Agora que já sabe o que é uma função BJ (funções na cor vermelha), converta algumas de suas triggers para o formato custom text (jass) e veja o monstro que você está criando em forma de mapa.
Tudo isso é só uma noção básica para um bom programador de triggers.
Espero que seja útil. ")
---
Puts... Quase esqueço de dizer que seu mapa demo não abriu aqui. Abraço.
Tópicos semelhantes
» [Resolvido] spell (dota)
» [Spell] Toxic Laser Spell
» [Spell] Counter Helix (DotA)
» Spell Pack, Rubick (Dota)
» [Pedido de Spell] Preciso de uma Spell para meu map.
» [Spell] Toxic Laser Spell
» [Spell] Counter Helix (DotA)
» Spell Pack, Rubick (Dota)
» [Pedido de Spell] Preciso de uma Spell para meu map.
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|