-
Notifications
You must be signed in to change notification settings - Fork 5
/
Kru_AirshipEvents.js
44 lines (39 loc) · 1.27 KB
/
Kru_AirshipEvents.js
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
/*:
* Airship Events
*
* @plugindesc 1.0 Allows airships to interact with events.
*
* @author Krusynth
*
* @help
* By default, RPG Maker MV doesn't allow airships to interact with events.
* This plugin removes that limitation, allowing airships to land in towns, etc.
*
* Note that you'll have to create special handling for dealing with
* transfers (e.g. entering towns, etc.) for airships to use this as
* expected. The easiest way to achieve this is to add to your event
* a Conditional Branch for Vehicle: Airship is driven and move the
* transfer into the Else clause.
*
* Terms & Conditions
* This plugin is MIT Licensed. (Free for non-commercial and commercial use.)
*/
var Imported = Imported || {};
Imported.Kru_AirshipEvents = 1.0;
var Kru = Kru || {};
Kru.AE = {};
Kru.AE.Game_Player__canStartLocalEvents = Game_Player.prototype.canStartLocalEvents;
Game_Player.prototype.canStartLocalEvents = function() {
return true;
};
Game_Player.prototype.forceOffVehicle = function() {
this.setDirection(2);
this._followers.synchronize(this.x, this.y, this.direction());
this.vehicle().getOff();
this.setTransparent(false);
this._vehicleGettingOff = true;
this.setMoveSpeed(4);
this.setThrough(false);
this.makeEncounterCount();
this.gatherFollowers();
};