return function (self,magic)
local speed
if(zz_y7.use_attack_speed) then
return 3
end
if (magic) then
speed = 9
else
speed = self.CurrentWeaponAttackSpeed
end
speed += self.Entity.PlayerTemporaryStat:GetValue(_CTS.Booster)
if (speed < 5) then
return 3
end
if (speed > 9) then
return 9
end
return speed
end
공속 스크립트 이거 공속치기전에 기본 공속은 어떤거 건들여? 리턴은 쳤을때고
| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 44994 | 02-27 | 1104 | ||
| 44993 | 02-27 | 471 | ||
| 44992 | 02-27 | 387 | ||
| 44991 | 02-27 | 807 | ||
| 44990 | 02-27 | 395 | ||
| 44989 | 02-27 | 350 | ||
| 44988 | 02-27 | 964 | ||
| 44987 | 02-27 | 394 | ||
| 44986 | 02-27 | 772 | ||
| 44985 | 02-27 | 357 | ||
| 44984 | 02-27 | 435 | ||
| 44983 | 02-27 | 363 | ||
| 44982 | 02-27 | 598 | ||
| 44981 | 02-27 | 366 | ||
| 44980 | 02-27 | 383 | ||
| 44979 | 02-27 | 565 | ||
| 44978 | 02-27 | 585 | ||
| 44977 | 02-27 | 373 | ||
| 44976 | 02-27 | 422 | ||
| 44975 | 02-27 | 348 |
댓글1
-- 함수 정의: self와 magic을 매개변수로 받는다.
function (self, magic)
local speed -- 속도를 저장할 지역 변수 선언
-- zz_y7.use_attack_speed가 참이면 속도를 3으로 설정하고 함수를 종료한다.
if (zz_y7.use_attack_speed) then
return 3
end
-- magic이 참이면 속도를 9로 설정한다.
if (magic) then
speed = 9
else
-- magic이 거짓이면 현재 무기의 공격 속도를 사용한다.
speed = self.CurrentWeaponAttackSpeed
end
-- 속도에 일시적인 통계 값을 추가한다. (_CTS.Booster를 통해 얻은 값)
speed += self.Entity.PlayerTemporaryStat:GetValue(_CTS.Booster)
-- 속도가 5 미만이면 3을 반환한다.
if (speed < 5) then
return 3
end
-- 속도가 9 초과면 9를 반환한다.
if (speed > 9) then
return 9
end
-- 그 외의 경우, 계산된 속도를 반환한다.
return speed
end