LeoNguyen112
Dragon Quest
- 22/5/10
- 1,438
- 581
YAN[asian];21891519 nói:Có cách nào 1 Player play 1 sound mà Player enemy ko thể nghe thấy ko?
Dùng local player. Xem thêm cách dùng.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
YAN[asian];21891519 nói:Có cách nào 1 Player play 1 sound mà Player enemy ko thể nghe thấy ko?
Rockthrow
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Rockthrow
Actions
Set Caster_Skill[1] = (Casting unit)
Set Point_Skill[1] = (Position of Caster_Skill[1])
Set Target_Skill[1] = (Target point of ability being cast)
Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees
Set Dummy_Skill[1] = (Last created unit)
Unit - Turn collision for Dummy_Skill[1] Off
Trigger - Turn on Loop Rockthrow <gen>
Loop Rockthrow
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Set Point_Skill[2] = (Position of Dummy_Skill[1])
Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees)
Unit - Move Dummy_Skill[1] instantly to Point_Skill[3]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00
Then - Actions
Trigger - Turn off (This trigger)
Unit - Remove Dummy_Skill[1] from the game
Custom script: call RemoveLocation(udg_Target_Skill[1])
Custom script: call RemoveLocation(udg_Point_Skill[1])
Custom script: call RemoveLocation(udg_Point_Skill[2])
Custom script: call RemoveLocation(udg_Point_Skill[3])
Set Group_Skill[1] = (Units within 500.00 of Target_Skill[1] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True))
Unit Group - Pick every unit in Group_Skill[1] and do (Actions)
Loop - Actions
Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup(udg_Group_Skill[1])
Else - Actions
Custom script: call RemoveLocation(udg_Point_Skill[2])
Custom script: call RemoveLocation(udg_Point_Skill[3])


Time - Every 30.00 seconds of game time
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
Game - Display to (All players) the text: WTF
Events
Time - Elapsed game time is 15.00 seconds
Conditions
Actions
-------- TURN ON SPAWN CREEP --------
Trigger - Turn on Trigger 1 <gen>

Đáng lẽ (theo mình nghĩ ) thì khi turn on thì sau 30s ( giây thứ 45 ) sẽ chạy Game - Display to (All players) the text: WTF, nhưng khi test thì giây thử 30 đã chạy rồi. Ai giải thix hộ với
cám ơn nhé, cho mình hỏi cái này , khi sử dụng các lênh remove leak có ảnh hưởng j tới var ko ? hay chỉ reset lại var thui, DestroyTimer thì hình như là xóa luôn cái timer fải ko? vì mình xài DestroyTimer cho 1 var thì ko thể gọi lại var đó nữa
Cho hỏi nếu chỉ play sound thôi có gây leak không? Có cần phải stop/destroy sound đó?
Cho mình hỏi file nhạc dùng để import vào map thì là đuôi .mp3, nhưng sao cái nhạc mình cũng là .mp3 mà import vào mà mở nó ko lên
Nó còn báo là " This does not appear to be a vail sound file "
Edit: Đã import đc
Nhưng tại sao chỉ Play Sound đc đúng 1 lần, dùng trigger Play lần nữa nó k chạy ?

Phải.cho hỏi khi xài lệnh Set TempGroup = Unit in range....., những Unit trong range nhưng có skill Locust sẽ ko đc set vào group fải ko ?
Cho hỏi nếu chỉ play sound thôi có gây leak không? Có cần phải stop/destroy sound đó?
Cho hỏi trigger này có lôi, leak, ... gì ko mà khi dùng skill thì rất lag, dùng 2-3 lần là khỏi chơi
Mã:Rockthrow Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Rockthrow Actions Set Caster_Skill[1] = (Casting unit) Set Point_Skill[1] = (Position of Caster_Skill[1]) Set Target_Skill[1] = (Target point of ability being cast) Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees Set Dummy_Skill[1] = (Last created unit) Unit - Turn collision for Dummy_Skill[1] Off Trigger - Turn on Loop Rockthrow <gen>Thậm chí mình đã thử làm một skill khác, y chang, có điều ko remove cả leak,mà vẫn ko lag bằng skill nàyMã:Loop Rockthrow Events Time - Every 0.04 seconds of game time Conditions Actions Set Point_Skill[2] = (Position of Dummy_Skill[1]) Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees) Unit - Move Dummy_Skill[1] instantly to Point_Skill[3] If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00 Then - Actions Trigger - Turn off (This trigger) Unit - Remove Dummy_Skill[1] from the game Custom script: call RemoveLocation(udg_Target_Skill[1]) Custom script: call RemoveLocation(udg_Point_Skill[1]) Custom script: call RemoveLocation(udg_Point_Skill[2]) Custom script: call RemoveLocation(udg_Point_Skill[3]) Set Group_Skill[1] = (Units within 500.00 of Target_Skill[1] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True)) Unit Group - Pick every unit in Group_Skill[1] and do (Actions) Loop - Actions Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl Special Effect - Destroy (Last created special effect) Custom script: call DestroyGroup(udg_Group_Skill[1]) Else - Actions Custom script: call RemoveLocation(udg_Point_Skill[2]) Custom script: call RemoveLocation(udg_Point_Skill[3])
Cả 2 skill đều base y nhau, tuy nhiên skill lag này dummy có type move là hover và height là 200, chỉ khác 2 điểm vậy thôi
Vậy ai giải thích giúp mình vì sao lại lag ko? :(
cho hỏi Damage Type Universal và Devine khác nhau ntn ?
---------- Post added at 12:19 ---------- Previous post was at 12:12 ----------
khi dùng trigger để deal dmg lên 1 unit thì nên dùng loại Dmg nào để Damge đó xuyên giáp, ko xuyên kháng phép, giảm bởi kháng phép
Quoteeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Rockthrow
Actions
Set Caster_Skill[1] = (Casting unit)
Set Point_Skill[1] = (Position of Caster_Skill[1])
Set Target_Skill[1] = (Target point of ability being cast)
Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees
Set Dummy_Skill[1] = (Last created unit)
Unit - Turn collision for Dummy_Skill[1] Off
Trigger - Turn on Loop Rockthrow <gen>
Loop Rockthrow
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Set Point_Skill[2] = (Position of Dummy_Skill[1])
Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00
Then - Actions
Trigger - Turn off (This trigger)
Unit - Remove Dummy_Skill[1] from the game
Set Group_Skill[1] = (Units within 500.00 of Target_Skill[1] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True))
Unit Group - Pick every unit in Group_Skill[1] and do (Actions)
Loop - Actions
Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
Special Effect - Destroy (Last created special effect)
[B] Custom script: call RemoveLocation(udg_Point_Skill[1])
Custom script: call RemoveLocation(udg_Point_Skill[2])
Custom script: call RemoveLocation(udg_Point_Skill[3])
Custom script: call RemoveLocation(udg_Target_Skill[1])[/B]
Custom script: call DestroyGroup(udg_Group_Skill[1])
Else - Actions
[B]Unit - Move Dummy_Skill[1] instantly to Point_Skill[3][/B]
Custom script: call RemoveLocation(udg_Point_Skill[2])
Custom script: call RemoveLocation(udg_Point_Skill[3])
[/spoil][spoil]
Mã:Rockthrow Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Rockthrow Actions Set Caster_Skill[1] = (Casting unit) Set Point_Skill[1] = (Position of Caster_Skill[1]) Set Target_Skill[1] = (Target point of ability being cast) Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees Set Dummy_Skill[1] = (Last created unit) [COLOR="#FF0000"] Unit - Turn collision for Dummy_Skill[1] Off[/COLOR] Locust cũng phải off ? Trigger - Turn on Loop Rockthrow <gen>Thậm chí mình đã thử làm một skill khác, y chang, có điều ko remove cả leak,mà vẫn ko lag bằng skill nàyMã:Loop Rockthrow Events Time - Every 0.04 seconds of game time Conditions Actions Set Point_Skill[2] = (Position of Dummy_Skill[1]) Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees) Unit - Move Dummy_Skill[1] instantly to Point_Skill[3] If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00 Then - Actions Trigger - Turn off (This trigger) Unit - Remove Dummy_Skill[1] from the game [COLOR="#FF0000"] Custom script: call RemoveLocation(udg_Target_Skill[1])[/COLOR] Remove rồi thì ở dưới SetGroup ở đâu? Custom script: call RemoveLocation(udg_Point_Skill[1]) Custom script: call RemoveLocation(udg_Point_Skill[2]) Custom script: call RemoveLocation(udg_Point_Skill[3]) Set Group_Skill[1] = (Units within 500.00 of [COLOR="#FF0000"]Target_Skill[1][/COLOR] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True)) Unit Group - Pick every unit in Group_Skill[1] and do (Actions) Loop - Actions Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl Special Effect - Destroy (Last created special effect) Custom script: call DestroyGroup(udg_Group_Skill[1]) Else - Actions Custom script: call RemoveLocation(udg_Point_Skill[2]) Custom script: call RemoveLocation(udg_Point_Skill[3])
Cả 2 skill đều base y nhau, tuy nhiên skill lag này dummy có type move là hover và height là 200, chỉ khác 2 điểm vậy thôi
Vậy ai giải thích giúp mình vì sao lại lag ko? :([/B]
1) Universal có thể tác dụng lên chống phép, Devine thì ko. Xem cái nàycho hỏi Damage Type Universal và Devine khác nhau ntn ? khi dùng trigger để deal dmg lên 1 unit thì nên dùng loại Dmg nào để Damge đó xuyên giáp, ko xuyên kháng phép, giảm bởi kháng phép