전략게시판

전략게시판 [스튜디오]
6개 이상 텔레포트 가능한가?
2019.05.18 13:30 조회 : 2952
Lv. 347ServerName 래인지로버 작성자 게시물 더보기


만들어 드렸습니다^^

tel1={x=10,y=28,z=2}
tel2={x=13,y=28,z=2}
tel3={x=16,y=28,z=2}
tel4={x=19,y=28,z=2}
tel5={x=22,y=28,z=2}
tel6={x=25,y=28,z=2}
tel7={x=28,y=28,z=2}
 
randTele=Game.EntityBlock:Create ({x=19,y=21,z=1})
function randTele:OnTouch( player )
 local rand=math.random(1,7)
 

 if rand==1 then
 player.position=tel1
 elseif rand==2 then
 player.position=tel2
 elseif rand==3 then
 player.position=tel3
 elseif rand==4 then
 player.position=tel4
 elseif rand==5 then
 player.position=tel5
 elseif rand==6 then
 player.position=tel6
 elseif rand==7 then
 player.position=tel7
 end
 
end
 
간단한 거라 설명 없이도 이해할수 있으리라 밓읍니다;

원래 한번 들렀던 구간은 다시 안나오게도 만드려 했는데
루아 문법이 너무 달라서 하다 빡쳐서 때려침


테스트 해보고싶으면 스튜디오에 내 닉 검색 ㄱ
추천 : 0
댓글을 남기시려면 로그인 해주세요
댓글 : 2
  • 한번 들린곳 다시 안나오게 하려면 IF 문에 클리어 여부에 대한 AND조건과 나머지 되돌아가는 구문을 더 추가해야 할듯. Lv. 918YoRHa 2019.05.18
  • 게이 수고했다 Lv. 185스으스 2019.05.18