đúng là như thế, tks cậu nhìu nha
ah, nhưng h gặp thêm lỗi nữa là khi tảget vào một point thì nó bay cực kỳ xa, bay tới tận cùng map luôn. H sao??
Mã:
Sneaking is Good
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Sneaking is Good!
Actions
Set Caster[3] = (Triggering unit)
Set Temp_loc1 = (Position of Caster[3])
Set Temp_loc2 = (Target point of ability being cast)
Set Slide_Angle = (Angle from Temp_loc1 to Temp_loc2)
Set Slide_Tick = 10
[COLOR="#FF0000"] Set Slide_Distance = (Distance between Temp_loc1 and Temp_loc2)[/COLOR]
Trigger - Turn on Sneaking is Good move <gen>
Custom script: call RemoveLocation (udg_Temp_loc1)
Custom script: call RemoveLocation (udg_Temp_loc2)
Mã:
Sneaking is Good move
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Slide_Tick Equal to 0
Then - Actions
[COLOR="#FF0000"] Special Effect - Destroy (Last created special effect)[/COLOR]
Trigger - Turn off (This trigger)
Skip remaining actions
Else - Actions
Set Slide_Tick = (Slide_Tick - 1)
Set Temp_loc1 = (Position of Caster[3])
Set Temp_loc2 = (Temp_loc1 offset by Slide_Distance towards Slide_Angle degrees)
Unit - Move Caster[3] instantly to Temp_loc2
Unit - Create 1 Dummy Soulcontroler 2 for (Owner of Caster[3]) at Temp_loc2 facing Default building facing degrees
Unit - Set level of Howl of Terror for (Last created unit) to (Level of Sneaking is Good! for Caster[3])
Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
[COLOR="#FF0000"] Special Effect - Create a special effect attached to the hands of Caster[3] using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl[/COLOR]
Custom script: call RemoveLocation (udg_Temp_loc1)
Custom script: call RemoveLocation (udg_Temp_loc2)