- 6/9/05
- 5,732
- 162,707
anh Tom có hướng dẫn cách silde rồi nhưng rắc rối lắm
hôm nay lập topic này tui chỉ các bạn cách làm spell silde nhanh mà gọn ko rắc rối như anh Tom
gồm các biến như sau : TempUnit(Unit);TempLoc(Point0;TempLoc2(Point);MoveToPoint(Point);Real(Real);Angel(Real)N(Real) tất cả đều ko có array và cái spell Wave đó là spell ShockWave đó tui chỉ đổi tên thôi
ko hiểu thì mở map tui attach ở dưới ra xem :wink:
hôm nay lập topic này tui chỉ các bạn cách làm spell silde nhanh mà gọn ko rắc rối như anh Tom
Mã:
Untitled Trigger 001
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Wave
Actions
Set TempUnit = (Casting unit)
Set TempLoc = (Position of TempUnit)
Set TempLoc2 = (Target point of ability being cast)
Set Real = (Distance between TempLoc and TempLoc2)
Set Angel = (Angle from TempLoc to TempLoc2)
Set N = 0.00
Wait 0.20 seconds
Unit - Pause TempUnit
Animation - Play TempUnit's spell channel animation
Unit - Turn collision for TempUnit Off
Trigger - Turn on Untitled Trigger 002 <gen>
Mã:
Untitled Trigger 002
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Set TempLoc = (Position of TempUnit)
Set MoveToPoint = (TempLoc offset by 20.00 towards Angel degrees)
Set N = (N + 20.00)
Unit - Move TempUnit instantly to MoveToPoint
Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_MoveToPoint)
Custom script: call RemoveLocation (udg_TempLoc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(N Greater than or equal to Real) or ((TempUnit is dead) Equal to True)
Then - Actions
Unit - Unpause TempUnit
Unit - Turn collision for TempUnit On
Animation - Reset TempUnit's animation
Custom script: set udg_TempUnit = null
Custom script: call RemoveLocation(udg_MoveToPoint)
Trigger - Turn off (This trigger)
Else - Actions
Do nothing
ko hiểu thì mở map tui attach ở dưới ra xem :wink:
