질문과 답변

Extra Form

this.wait(frame)을 제외한 독립된 대기스크립트를 알수있을까요?


yanfly buffsstatecore 라는 플러그인으로 피격시 발동하는 state를 만들고 있는데요

this.wait(frame)을 쓰면 this가 $gameActor를 수식하는거같아서 오류가납니다

내장함수를 찾아보니 rpg_object 8902번째 줄 wait에 관한부분은

Game_Interpreter.prototype.wait = function(duration) {

    this._waitCount = duration;

};

라고나오는데요 저 game_interpreter를 수식하려면 어떤걸 써야하는지 모르겠습니다



제가 yanfly buffsstatecore 플러그인으로 만들고 있는 state의 한단락입니다

<Custom Conclude Effect>

if (target.result().physical) {

target.startAnimation(120);

this.wait(90);

user.startAnimation(1);

}

</Custom Conclude Effect>


여기서 this.wait이 오류가나는데 대체를 할려면 어떻게해야할지 아시는 분 계신가요

Comment '2'
  • profile
    러닝은빛 2016.01.06 11:54
    인터프리터 객체는 읽어들일 리스트가 있으면 실행되는데,

    그냥 조건 맞춰서 아래와 같이 함수 하나 만들어두면 됩니다.

    커먼 이벤트에서 대기 커맨드를 실행하는 것과 같은 효과

    1
    2
    3
    4
    5
    6
    7
    8
    function wait(time) {
      var self = $gameMap._interpreter;
      var list = [];
      var eventID = 0;
      list.push({code: 230, indent: 0, parameters: [time || 0]});
      list.push({code: 0, indent: 0, parameters: [0]});
      self.setup(list, eventID);
    }
    cs


    이렇게 하면 어디에서든 그냥


    wait(60);


    등으로 쓸 수 있습니다.

  • ?
    최다킬 2016.01.06 15:43
    아하 친절한 답변감사합니다! 당장 해봐야겠습니다 ㅋㅋ

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12448
Board Pagination Prev 1 ... 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 Next
/ 43