질문과 답변

Extra Form

 

 

 

 

 

안녕하세요. 만드는 중에 또 막히는 부분이 있어 질문드립니다.

 

 이번엔 파이어, 스킬베기 등의 애니메이션 재생 위치를 질문드리려고 하는데요

 

 

 

-----------------------

 

 

'베기'공격을 당했을때, 첫번째 그림처럼 작게, 그리고 위치도 이상한 곳에 표시가 되는데요,

 

두번째 그림처럼 애니메가 크게, 원하는 위치대로

 

재생시킬 수 있는 방법이 있는지 궁금합니다.

 

(반대로 제가 공격버튼을 누를 땐, 적 오크 중간 위치로 크게 재생됩니다. MV 기본설정이 그런듯 합니다)

 

 

-----------------------

 

 

 추가로, '체력이 줄어들 때' 라는 if문을 만들고 싶은데요.

 

조건분기나 변수를 어떻게 설정해야 할지 궁금합니다.

 

 

항상 감사드립니다~! 좋은 밤 되세요.

 

 

 

 

 

 

 

■ 질문전 필독!
  • 질문할 내용이 이 게시판이나 강좌에 이미 있는지 확인합니다.
  • 하나의 게시물에는 하나의 질문만 합니다.
  • 제목은 질문의 핵심 내용으로 작성합니다.
  • 질문 내용은 답변자가 쉽게 이해할 수 있도록 최대한 상세하게 작성합니다.
  • 스크립트의 전문이 필요할 경우 txt 파일 등으로 첨부해 주시기 바랍니다.
  • 답변받은 게시물은 삭제하지 않습니다.
  • 답변이 완료된 경우 해당 답변해주신 분들께 감사의 댓글을 달아줍니다.
    • 처음 오신 분들은 공지 게시물을 반드시 읽어주세요!

※ 미준수시 사전경고 없이 게시물을 삭제합니다.

Comment '2'
  • ?
    랑비 2016.05.15 00:27
    불덩이를 던졌다가 타겟지점에 도착하면 폭발하는 에니메이션을 구현했었을때
    에니메이션을 원하는 위치에 하기위해서 저같은 경우에는 이런 스크립트를 사용했었습니다.

    var _Sprite_Animation_setup = Sprite_Animation.prototype.setup;
    Sprite_Animation.prototype.setup = function(target, animation, mirror, delay) {

    //this._id= target._character._eventId;
    if($gameMap._events[target._character._eventId]._change_animation_target){
    this._ischangeposition=$gameMap._events[target._character._eventId]._change_animation_target;
    this._change_x = $gameMap._events[target._character._eventId]._change_x;
    this._change_y = $gameMap._events[target._character._eventId]._change_y;
    if($gameMap._events[target._character._eventId]._target_id){
    var target=SceneManager._scene._spriteset._characterSprites.filter(function(event){ if(event._character._eventId===$gameMap._events[target._character._eventId]._target_id){return event} })[0];
    }
    _Sprite_Animation_setup.apply(this,arguments);

    $gameMap._events[target._character._eventId]._change_animation_target=false;
    $gameMap._events[target._character._eventId]._target_id=0;

    }else{
    _Sprite_Animation_setup.apply(this,arguments);
    }
    };
    var _Sprite_Animation_prototype_updatePosition = Sprite_Animation.prototype.updatePosition;
    Sprite_Animation.prototype.updatePosition = function() {
    _Sprite_Animation_prototype_updatePosition.call(this);
    if(this._ischangeposition){
    this.x=this._change_x;
    this.y=this._change_y;
    }
    }

    Game_CharacterBase.prototype.target_animation = function(target_id,animation_id) {
    this._change_animation_target=true;
    this._animationId= animation_id;
    this._change_x=$gameMap._events[target_id].screenX();
    this._change_y=$gameMap._events[target_id].screenY();
    this._target_id=target_id;
    };

    function point_animation(event_id , animation_id, x, y){
    $gameMap._events[event_id]._change_animation_target=true;
    $gameMap._events[event_id]._animationId= animation_id;
    $gameMap._events[event_id]._change_x=x;
    $gameMap._events[event_id]._change_y=y;
    }

    그리고 아래의 한줄로 실행을 시켰었지요...
    point_animation(i,139,$gameScreen._pictures[i]._targetX,$gameScreen._pictures[i]._targetY)
    point_animation(이벤트 아이디,에니메이션 아이디,에니메이션이 위치할 x,에니메이션이 위치할 y);

    그런데 .... 미숙한 스크립트라 추천할수가 없군요.... 원하시는 표현을 구현하실때 참고하시라고 적었습니다.
  • ?
    랑비 2016.05.15 00:36
    아래보다 더 쉬운방법은... 이벤트의 위치에 에니메이션이 발동하니까요 이벤트의 위치를 여성그림좌표로 이동시키면 되겟네요

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12392
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