-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathYEP_EventChasePlayer107JP-p.txt
More file actions
199 lines (199 loc) · 6.95 KB
/
Copy pathYEP_EventChasePlayer107JP-p.txt
File metadata and controls
199 lines (199 loc) · 6.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/*:ja
* @plugindesc v1.07 プレイヤーが近づくと、プレイヤーを追いかけたり、逃げるイベントを作成できます。
* @author Yanfly Engine Plugins
*
* @param Sight Lock
* @text 追跡時間
* @type number
* @max 9007
* @desc 'SeePlayer'がtrueの時、イベントがプレイヤーを追いかける時間(フレーム単位)
* @default 300
*
* @param See Player
* @text プレイヤー認識有効化
* @type boolean
* @on 有効
* @off 無効
* @desc イベントのプレイヤー認識を有効化
* 無効:false / 有効:true
* @default true
*
* @param Alert Timer
* @text 認識フキダシ表示時間
* @type number
* @max 9007
* @desc イベントにフキダシ表示されるまでにかかるフレーム数
* @default 120
*
* @param Alert Balloon
* @text 表示フキダシ
* @type select
* @option 無効
* @value 0
* @option びっくり
* @value 1
* @option はてな
* @value 2
* @option 音符
* @value 3
* @option ハート
* @value 4
* @option 怒り
* @value 5
* @option 汗
* @value 6
* @option くしゃくしゃ
* @value 7
* @option 沈黙
* @value 8
* @option 電球
* @value 9
* @option Zzz
* @value 10
* @option ユーザ定義1
* @value 11
* @option ユーザ定義2
* @value 12
* @option ユーザ定義3
* @value 13
* @option ユーザ定義4
* @value 14
* @option ユーザ定義5
* @value 15
* @desc プレイヤー認識時に表示するフキダシを指定(フキダシID)利用しない場合、0
* @default 1
*
* @param Alert Sound
* @text 認識音
* @type file
* @dir audio/se/
* @require 1
* @desc プレイヤー認識時に再生するSE
* @default Attack1
*
* @param Alert Common Event
* @text 認識コモンイベント
* @type common_event
* @desc 認識時に実行するコモンイベント。利用しない場合、0
* @default 0
*
* @param Return After
* @text 追跡終了後動作
* @type boolean
* @on 戻す
* @off 終了時位置
* @desc 追跡/逃走後、イベントを元の位置に戻すか。終了時位置:false / 戻す:true
* @default true
*
* @param Return Wait
* @text 追跡終了後時間
* @type number
* @max 9007
* @desc 追跡/逃走後、次の動作までのフレーム数
* @default 180
*
* @help
* 翻訳:ムノクラ
* https://fungamemake.com/
* https://twitter.com/munokura/
*
* ===========================================================================
* 導入
* ===========================================================================
*
* このプラグインは、プレイヤーを追いかけるイベント、
* プレイヤーから逃げるイベントを作成することができます。
* プレイヤーがイベントから一定の距離範囲内に入った時や
* イベントがプレイヤーを認識した際に発動させることができます。
*
* ===========================================================================
* 使用方法
* ===========================================================================
*
* イベントの自律移動タイプを「カスタム」にし、
* 「ルート…」内の「スクリプト…」内に次のコードを入れることで、
* そのイベントに追跡/逃走の指定ができます。
*
* 注*プレイヤーに対しては無効です。
*
* スクリプトの説明
* this._chaseRange = x
* →x の距離内に入った時、イベントがプレイヤーを追いかけます
* this._fleeRange = x
* →x の距離内に入った時、イベントはプレイヤーから逃げます
* this._chaseSpeed = x
* →追いかける時のイベントの速度 x を指定します
* this._fleeSpeed = x
* →逃げる時のイベントの速度 x を指定します
* this._sightLock = x
* →イベントは、フレーム数 x だけ追跡/逃走を行います
* this._seePlayer = true
* →イベントはプレイヤーを認識します
* this._seePlayer = false
* →イベントはプレイヤーを認識しません
* this._alertBalloon = x
* →プレイヤー認識時、フキダシID x を表示します
* this._alertSound = x
* →プレイヤー認識時、SE x を再生します
* this._alertSoundVol = x
* →プレイヤー認識時SEの音量を指定します
* this._alertSoundPitch = x
* →プレイヤー認識時SEのピッチを指定します
* this._alertSoundPan = x
* →プレイヤー認識時SEのパンを指定します
* this._alertCommonEvent = x
* →プレイヤー認識時、コモンイベントID x を実行します
* this._returnAfter = true
* →イベントを元の位置に戻します
* this._returnAfter = false
* →追跡/逃走が終わってもイベントはそこに留まります
* this._returnWait = x
* →追跡/逃走が終わった後 x の間待機します
*
* カスタム移動ルート内でイベントを実行させる場合、
* 移動頻度はなるべく高く設定するようにしてください。
* 設定が完了し有効になるまでは、これらの効果は動作しません。
* 移動頻度の低いイベントの場合、
* マップロード中に'this._chaseRange = x'の読み込みを完了できず、
* プレイヤーを追いかけなくなってしまう可能性があります。
*
* ===========================================================================
* Changelog
* ===========================================================================
*
* Version 1.07:
* - Added a background mechanic to stagger an event if they're chasing the
* player and get caught behind an object. This will prevent the event from
* continuously chasing the player and dropping the FPS rate.
*
* Version 1.06:
* - Updated for RPG Maker MV version 1.5.0.
*
* Version 1.05:
* - Optimization update.
*
* Version 1.04:
* - Fixed a bug with this._seePlayer causing them to see stealthed players.
*
* Version 1.03:
* - Improved pathfinding for chasing events. They will get stuck less by
* walls and/or events that may be blocking the event.
* - Added random factor for fleeing events. Fleeing events won't simply just
* run away 180 degrees away from the player. They will sometimes move in a
* random direction.
*
* Version 1.02:
* - Added 'Return After' parameter where events will return to their original
* spot after chasing/fleeing from a player.
* - Added 'Return Wait' parameter to determine how long an event will wait in
* place before returning after a finished chase/flee.
* - Added 'this._returnAfter' and 'this._returnWait' to the list of available
* movement route script calls.
*
* Version 1.01:
* - Added 'this._alertSoundPitch' 'this._alertSoundVol' 'this._alertSoundPan'
* to the settings you can alter to adjust the alert sound.
*
* Version 1.00:
* - Finished Plugin!
*/