MZ用プラグイン

独自ジャンプや昇降を実装 - UniqueJump.js

シェア用テキスト:
▼独自ジャンプや昇降を実装(あわやまたな様作) - UniqueJump.js
https://plugin-mz.fungamemake.com/archives/6512
自由に動ける独自のジャンプを使用可能にします。

ふりがな:どくじじゃんぷやしょうこうをじっそう

機能概要: 自由に動ける独自のジャンプを使用可能にします。

利用規約(ライセンス): MITライセンス

作者:あわやまたな

作者サイト:https://awaya3ji.seesaa.net/

解説ページ:https://awaya3ji.seesaa.net/article/502381176.html

ファイル名:UniqueJump.js

プラグインのヘルプ:

/*:
* @target MZ
* @orderAfter PriorityFix
* @orderAfter OverpassTile
* @orderBefore AWY_MotionMaker
* @plugindesc 自由に動ける独自のジャンプを使用可能にします。
* @author あわやまたな (Awaya_Matana)
* @url https://awaya3ji.seesaa.net/article/502381176.html
* @help 
* 【基本】
* this.jump(距離X, 距離Y)     //ジャンプ(コアスクリプト)
* this.setThrough(真偽値)     //すり抜け(コアスクリプト)
* this.uniqueJump(頂点, 時間) //独自ジャンプ
* this.uniqueJump(頂点)
* this.uniqueJump()
* 頂点:未入力で50
* 時間:未入力で(頂点*2)^0.5 * 2
* 真偽値:trueまたはfalse
*
* 【昇降】
* this.uniqueLift(高さ)       //高さを指定
* this.uniqueLift(高さ, 時間) //フレーム数を指定して移動
* this.uniqueLift(高さ, -1)   //ジャンプの残り時間で移動
* this.uniqueLift(高さ, -2)   //独自ジャンプの残り時間で移動
* this.updateOverPathOnLocate() //強制的に立体交差の上に上げる(OverpassTile)
* this._higher = false;       //強制的に立体交差から降ろす(OverpassTile)
*
* 【データ取得】
* this.isJumping()           //ジャンプ中か(コアスクリプト)
* this.isThrough()           //すり抜け中か
* this.direction()           //現在の向き(コアスクリプト)
* this.canPass(X座標, Y座標, 向き) //その座標からその方向に移動可能か(コアスクリプト)
* [2,4,6,8].every(d=>!this.canPass(this.x, this.y, d)) //現座標は全方向移動不可能か
* this.isUniqueJumping()     //独自ジャンプ中か
* this.isUniqueLifting()     //高さ変化中か
* this.uniqueJumpHeight()    //現在のジャンプ高さ
* this.uniqueJumpLastSpeed() //最新のフレーム毎上昇速度(下降はマイナスで表現)
* this.uniqueLiftHeight()    //現在の高さ
* this.isHigherPriority()    //立体交差上にいるか(OverpassTile)
* $gamePlayer.canMove()      //プレイヤーが操作可能な状態か
* $gamePlayer.isTouchMoveSucceeded() //タッチ移動に成功したか
* TouchInput.isTriggered()   //タッチをトリガーしたか。
* 向き:テンキーの矢印の数字に対応。
* ※canPassはすり抜けているか否かで結果が変わるので扱いには注意。
*
* 移動コマンドで使う場合はそのまま、
* イベントコマンドで使う場合はthisを$gamePlayer、
* もしくはthis.character(キャラクターID)に置き換えて使ってください。
*
* [更新履歴]
* 2024/02/16:Ver.1.0.0 公開。
* 2024/02/17:Ver.1.0.1 OverpassTileが無くても動くように修正。
* 2024/02/17:Ver.1.0.2 茂み深さを高さに応じて変化するように修正。
*
* @command uniqueJump
* @text 独自ジャンプ
* @desc 移動の拘束されないジャンプです。
* @arg characterId
* @text キャラクターID
* @desc このイベント:0 プレイヤー:-1
* @default -1
* @arg peak
* @text 頂点
* @desc ジャンプの最高到達点です。
* @default 50
* @arg count
* @text 時間
* @desc 滞空時間です。0で自動算出。
* (時間) = (頂点*2)^0.5 * 2
* @default 0
* @arg wait
* @text 完了までウェイト
* @desc 完了するまで待ちます。
* @type boolean
* @default false
*
* @command uniqueLift
* @text 昇降
* @desc 高さを滑らかに変更します。
* @arg characterId
* @text キャラクターID
* @desc このイベント:0 プレイヤー:-1
* @default -1
* @arg height
* @text 高さ
* @desc 目標の高さです。
* @default 0
* @arg count
* @text 時間
* @desc 移動時間です。
* 瞬時に反映:0 ジャンプの時間:-1 独自ジャンプの時間:-2
* @default 0
* @arg wait
* @text 完了までウェイト
* @desc 完了するまで待ちます。
* @type boolean
* @default false
*
*/

スポンサードリンク

スポンサードリンク

-MZ用プラグイン

Copyright© #ツクプラMZ , 2026 All Rights Reserved.