Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


2 participantes

    Sistema de pulo ^^.

    Kies
    Kies
    Diva
    Diva


    Mensagens : 1154
    Créditos : 124

    Ficha do personagem
    Nível: 1
    Experiência:
    Sistema de pulo ^^. Left_bar_bleue0/0Sistema de pulo ^^. Empty_bar_bleue  (0/0)
    Vida:
    Sistema de pulo ^^. Left_bar_bleue30/30Sistema de pulo ^^. Empty_bar_bleue  (30/30)

    Sistema de pulo ^^. Empty Sistema de pulo ^^.

    Mensagem por Kies Dom Nov 22, 2015 9:28 pm

    Bom sistema muito legalzinho curi muito segue ele:


    Condições de uso:

    Pode ser usado em qualquer projeto basta dar os cred ao: MV



    Código:
    /*:
     * @plugindesc Sistema de Pulo
     * @author MV/Legendary Paladin
     * @param Tamanho do Pulo
     * @desc Adiciona pulo ao jogo
     * @default 2
     */
      (function() {
         var parameters = PluginManager.parameters('JumpSystemMV');
       var jumpheight= Number(parameters['Tamanho do Pulo']);
        Game_Player.prototype.update = function(sceneActive) {
        var lastScrolledX = this.scrolledX();
        var lastScrolledY = this.scrolledY();
        var wasMoving = this.isMoving();
        this.updateDashing();
        if (sceneActive) {
            this.moveByInput();
        }
        Game_Character.prototype.update.call(this);
        this.updateScroll(lastScrolledX, lastScrolledY);
        this.updateVehicle();
        if (!this.isMoving()) {
            this.updateNonmoving(wasMoving);
        }
        this._followers.update();
       if(this.isJumping()){
       }else{
       if (Input.isTriggered('ok')){
          this.jumpPosition($gamePlayer.direction()); //CRIADO POR LEGENDARY PALADIN / MV
       
       }
       }
    };
    Game_Player.prototype.jumpPosition=function(dirr){
       var jumpheight2=jumpheight;
       switch(dirr){
       case 2:
       if($gameMap.isPassable(this.x,(this.y+jumpheight))){
       this.jump(0,jumpheight);
       }else{
          while($gameMap.isPassable((this.x),(this.y+jumpheight2))==false){
          jumpheight2--;
       }
       if(jumpheight2!=0){
       this.jump(0,jumpheight2);
       }
       }
       break;
       case 4:
       if($gameMap.isPassable((this.x-jumpheight),(this.y))){
       this.jump(-jumpheight,0);
       }else{
       while($gameMap.isPassable((this.x-jumpheight2),(this.y))==false){
          jumpheight2--;
       }
       if(jumpheight2!=0){
       this.jump(-jumpheight2,0);
       }
       }
       break;
       case 6:
          //alert('this');
       if($gameMap.isPassable((this.x+jumpheight),(this.y))){
       this.jump(jumpheight,0);
       }else{
       while($gameMap.isPassable((this.x+jumpheight2),(this.y))==false){
       jumpheight2--;
       }
       if(jumpheight2!=0){
       this.jump(jumpheight2,0);
       }
       }
       break;
       case 8:
       if($gameMap.isPassable(this.x,(this.y-jumpheight))){
       this.jump(0,-jumpheight);
       }else{
          while($gameMap.isPassable((this.x ),(this.y-jumpheight2))==false){
          jumpheight2--;
       }
       if(jumpheight2!=0){
       this.jump(0,-jumpheight2);
       }
       }
       break;
       }
    };
    })();



    Para quem não sabe fazer o arquivo de script:

    copie o cód jogue ele o no notpad "bloco de notas" depois salve como nome.js
    avatar
    Bruno Campao
    Novato
    Novato


    Mensagens : 8
    Créditos : 0

    Sistema de pulo ^^. Empty Re: Sistema de pulo ^^.

    Mensagem por Bruno Campao Qui Jan 19, 2017 5:35 pm

    para que serve?

      Data/hora atual: Qui Mar 28, 2024 6:38 am