[Thảo luận]làm Spell bằng Jass - chia sẻ và học hỏi ^^!

call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveUnit( GetLastCreatedUnit() )

cái gì đây, huề vốn à, :D vừa gọi ra đã remove ? fi' hết 1kb roài :D
 
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveUnit( GetLastCreatedUnit() )

cái gì đây, huề vốn à, :D vừa gọi ra đã remove ? fi' hết 1kb roài :D

Cái dòng trên là order nó cast xong kô remove thì làm sao:-"
 
ZZZZ....nếu vừa Create ra mà hok có Wait thì Remove nó đi cũng thừa...Create - Remove ??????
 
=((
MUI là sao ? :| .Chì giúp với :-o
 
có nhiều cái dù vừa creat xong remove vẫn còn xài đc như mấy cái effect đó
còn cái này thì ko biết thử đi rồi mới biết
mà spell đó là GUI convert ra jass thôi có gì đâu mà khó :)
 
chài effect thì Destroy ngay đi dc, nhưng còn unit thì.......:-" nó chưa kip storm đã bị remove mất tiêu, 2 câu lenh mà ko có wait thì PC sẽ xử lí ~ 0s :D
 
ko phải lúc nào cũng dùng wait đâu bạn, dùng if để kiểm tra thì hay hơn nhiều :D
 
@NgacNhienChua!!, có thật là 0s ko ?
---
dummy unit thì sau khi create, order cast spell rồi add expiration timer luôn, gì phải wait với destroy ?
 
Tui làm thử vẫn thấy nó cast như bt, chà có vấn đề gì xảy ra cả:|
 
Bỏ 20s ra lên số cho skill này nè. Ko có JASSNEWGEN với lại viết nhanh...
Đoạn GUI kia quá nhiều cái rườm rà ko cần đến :D

Trig_Jump_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A03J'
endfunction

function lvl1 takes nothing returns boolean
return ( GetUnitAbilityLevel(GetTriggerUnit(),'A03J',) == 1 )
endfunction

function lvl2 takes nothing returns boolean
return ( GetUnitAbilityLevel (GetTriggerUnit(),'A03J') == 2 )
endfunction

function lvl3 takes nothing returns boolean
return ( GetUnitAbilityLevel (GetTriggerUnit(),'A03J') == 3 )
endfunction

function Trig_Jump_Actions takes nothing returns nothing
local unit dum
local unit u = GetTriggerUnit()
local location loc = GetUnitLoc(u)
local unit t = GetSpellTargetLoc()
local effect e = AddSpecialEffectTargetUnitBJ( "weapon,right", u, "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missi le_mini.mdl" )
call PauseUnit(u, false)
call SetUnitInvulnerable( u, true )
call SetUnitFacingToFaceLocTimed( u, t, 0.00 )
call SetUnitAnimation( u, "slam" )
call SetUnitTimeScalePercent( u, 50.00 )
call UnitAddAbility( u,'Amrf' )
call SetUnitFlyHeightBJ( u, 500.00, 500.00 )
call EnableTrigger( gg_trg_Move )
call TriggerSleepAction( 0.70 )
call SetUnitFlyHeightBJ( u, 0.00, 500.00 )
call TriggerSleepAction( 0.70 )
call DisableTrigger( gg_trg_Move )
call SetUnitTimeScalePercent( u, 100.00 )
call UnitRemoveAbility(u, 'Amrf')
call SetUnitInvulnerable( u, false )
call PauseUnit(u, false )
if ( lvl1()) then
set dum = CreateUnitAtLoc(GetOwningPlayer(u), 'e006', t, bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( lvl2()) then
set dum = CreateUnitAtLoc(GetOwningPlayer(u), 'e007', t, bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( lvl3()) then
set dum = CreateUnitAtLoc( GetOwningPlayer(u),'e008', t, bj_UNIT_FACING )
else
call DoNothing( )
endif
call IssueImmediateOrder( dum, "stomp" )
call RemoveUnit( dum )
call DestroyEffect( e )
call RemoveLocation(loc)
set u = null
set t = null
set loc = null
endfunction

//================================================== =========================
function InitTrig_Jump takes nothing returns nothing]
local trigger TT = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( TT, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( TT, Condition( function Trig_Jump_Conditions ) )
call TriggerAddAction( TT, function Trig_Jump_Actions )
set TT = null
endfunction

Move :
function Trig_Move_Actions takes nothing returns nothing
local unit t = GetSpellTargetUnit()
local unit u = GetTriggerUnit()
local location p = GetUnitLoc(u)
local location mvp = PolarProjectionBJ(p, ( DistanceBetweenPoints(p, t) / 100.00 ), GetUnitFacing(u))
call SetUnitPositionLoc( u, vmp )
call RemoveLocation(p)
call RemoveLocation(vmp)
set u = null
set t = null
set p = null
set vmp = null
endfunction

//================================================== =========================
function InitTrig_Move takes nothing returns nothing
local trigger trig = CreateTrigger()
call DisableTrigger( gg_trg_Move )
call TriggerRegisterTimerEvent( trig, 0.01, true )
call TriggerAddAction( trig, function Trig_Move_Actions )
set trig = null
endfunction
 
spell này làm GUI còn dễ nhìn hơn và lẹ hơn
làm jass kiểu này cũng thế :|
vjass mới khác :)
 
Vậy rongdoVN có thể làm giúp 1 cái Spell GUI này mà nhiều hero cast cùng 1 lúc được không ?:)
 
spell Jump MUI GUI í hả
mình ít khi làm spell JUMP lắm chỉ toàn làm nhảy thôi giống con hổ ý :D
 
cho em hỏi mình tạo skill đó = GUI sau đó chuyển nó thành Jass rồi làm cho nó MUI được ko vậy:(:(:(:(:( nếu được vậy thì quá là tốt.
 
cho em hỏi các biến max life của unit và damage của unit là gì vậy, em muốn là một spell làm tăng max life và damage của unit nhưng không biết để làm.
 
Real bạn à :)
 
không, ý mình hỏi là nếu muốn chỉnh max life của Détructable thì dùng lệnh:
call SetDestructableMaxLifeBJ( GetLastCreatedDestructable(), 100 )
Vậy nếu muốn chỉnh maxlife của unit và damage của unit thì dùng lệnh gì.
 
Destructable là:
Mã:
call Set[B]Destructable[/B]MaxLifeBJ( GetLastCreated[B]Destructable[/B](), 100 )
Thì Unit là:
Mã:
call Set[B]Unit[/B]MaxLifeBJ( GetLastCreated[B]Unit[/B](), 100 )
Đơn giản vậy thôi.....
 
bạn muốn hiểu rõ jass hơn thì xem những spell mình đã làm convert ra jass rồi xem từ từ
rồi tự làm lấy spell đó = jass là ok :D
 
không được game_war ơi viết vào nó erro liền
 
Back
Top