전략게시판

전략게시판 [스튜디오]
영역에 닿으면 제트팩 지급하는 스크립트
2020.03.01 13:40 조회 : 2062
Lv. 721XtremeBhop CosyClimbing 작성자 게시물 더보기

game.lua <<




JP = Game.EntityBlock:Create({x=0, y=0, z=0}) -- 제트팩 주는 영역 좌표값

function Game.Rule:OnPlayerConnect(player)
 player.user.jp = 0
end

function JP:OnTouch(player)
 player.user.jp = 1
end

function Game.Rule:OnPlayerSignal(player, signal)
 if player.user.jp == 1 then
  player.velocity = {z=300} -- 제트팩 출력
 end
end



---------


ui.lua <<



function UI.Event:OnInp/ut(inp/uts)
 if inp/uts[UI.KEY.SPACE] == true then -- 제트팩 발동 키
 UI.Signal(1)
 end
end




I.n.p.u.t 사이에 있는 / 지우고 쓸 것

추천 : 1
댓글을 남기시려면 로그인 해주세요
댓글 : 2
  • *따봉* Lv. 66익스트림트롤 2020.03.02
  • 혹시 하신분들은 이거 됬나요?? Lv. 300헌터킬러X45 2020.03.01