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
공속 스크립트 이거 공속치기전에 기본 공속은 어떤거 건들여? 리턴은 쳤을때고
제목 | 작성자 | 작성일 | 조회 | |
---|---|---|---|---|
공지 | 게시판 이용 안내+146 | 10-20 | 20261 | |
60260 | 00:25 | 54 | ||
60259 | 06-04 | 35 | ||
60258 | 06-04 | 79 | ||
60257 | 06-04 | 163 | ||
60256 | 06-04 | 330 | ||
60255 | 06-04 | 213 | ||
60254 | 06-04 | 257 | ||
60253 | 06-04 | 249 | ||
60252 | 06-04 | 376 | ||
60251 | 06-03 | 403 | ||
60250 | 06-03 | 245 | ||
60249 | ngs 관련해서+6 | 06-03 | 400 | |
60248 | 06-03 | 253 | ||
60247 | 06-03 | 636 | ||
60246 | 06-03 | 269 | ||
60245 | 06-03 | 394 | ||
60244 | ㅁㄹ H 삽니다+2 | 06-03 | 345 | |
60243 | 06-03 | 295 | ||
60242 | 06-02 | 637 |
댓글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