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
공속 스크립트 이거 공속치기전에 기본 공속은 어떤거 건들여? 리턴은 쳤을때고
| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 공지 | 게시판 이용 안내+156 | 10-20 | 22541 | |
| 61845 | 02-06 | 322 | ||
| 61844 | 02-06 | 286 | ||
| 61843 | 02-06 | 283 | ||
| 61842 | 02-03 | 688 | ||
| 61841 | 02-02 | 1229 | ||
| 61840 | 02-01 | 1158 | ||
| 61839 | 02-01 | 1049 | ||
| 61838 | 02-01 | 984 | ||
| 61837 | 01-29 | 1421 | ||
| 61836 | 01-29 | 1431 | ||
| 61835 | 01-28 | 1836 | ||
| 61834 | 01-28 | 1791 | ||
| 61833 | 메렌h 구해요+1 | 01-28 | 1672 | |
| 61832 | 01-24 | 2638 | ||
| 61831 | 01-23 | 2337 | ||
| 61830 | 01-23 | 2411 | ||
| 61829 | 01-23 | 2271 | ||
| 61828 | 01-23 | 2311 | ||
| 61827 | 01-23 | 2351 |
댓글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