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
공속 스크립트 이거 공속치기전에 기본 공속은 어떤거 건들여? 리턴은 쳤을때고
제목 | 작성자 | 작성일 | 조회 | |
---|---|---|---|---|
45003 | 02-27 | 316 | ||
45002 | 02-27 | 229 | ||
45001 | 02-27 | 545 | ||
45000 | 02-27 | 246 | ||
44999 | 02-27 | 206 | ||
44998 | 02-27 | 671 | ||
44997 | 02-27 | 251 | ||
44996 | 02-27 | 582 | ||
44995 | 02-27 | 213 | ||
44994 | 02-27 | 289 | ||
44993 | 02-27 | 215 | ||
44992 | 02-27 | 441 | ||
44991 | 02-27 | 217 | ||
44990 | 02-27 | 230 | ||
44989 | 02-27 | 414 | ||
44988 | 02-27 | 426 | ||
44987 | 02-27 | 218 | ||
44986 | 02-27 | 262 | ||
44985 | 02-27 | 199 | ||
44984 | 02-27 | 380 |
댓글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