Hi OcRam,
Was trying out the lights, I really like it so far, but I got an error: "Cannot read property 'offset' of undefined"
It seems to be when using
light_event or
light_event_name plugin commands.
So I made a new project added only OcRam_Lights v2.01
Then setup some events to test:
Event 1:
Plugin Command: light_bg #303040ff 0
Plugin Command: light_player 1 1 #ffffffff
Result: Worked perfectly
Event 2:
Comment: <light:5:240:#ffdd00ff:360>
Comment: <light-ex:0,-48:240:45:1>
Result: Worked perfectly
Event 3:
Plugin Command: light_event 6 2 400 #ff80000ff
Result: "Cannot read property 'offset' of undefined"
Event 3:
Plugin Command: light_event_name EV006 2 400 #ff80000ff
Result: "Cannot read property 'offset' of undefined"
Can you tell me what I've got wrong? is the console log useful for you?:
Spoiler: ConsoleLog
OcRam_Lights.js:1105 OcRam_Lights : OcRam_Light_Layer.prototype.initialize OcRam_Light_Layeralpha: 1buttonMode: (...)children: [Sprite]filterArea: nullparent: Spriteset_Map {_events: Events, _eventsCount: 0, tempDisplayObjectParent: null, transform: TransformStatic, alpha: 1, …}renderable: truetempDisplayObjectParent: nulltrackedPointers: (...)transform: TransformStatic {worldTransform: Matrix, localTransform: Matrix, _worldID: 1, _parentID: 1, position: ObservablePoint, …}visible: trueworldAlpha: 1_bg: Bitmap {__canvas: canvas, __context: CanvasRenderingContext2D, _dirty: false, _image: null, _url: "", …}_bounds: Bounds {minX: Infinity, minY: Infinity, maxX: -Infinity, maxY: -Infinity, rect: null}_boundsID: 401_boundsRect: null_destroyed: false_dx: -1.3333333333333333_dy: -1.3333333333333333_enabledFilters: null_events: Events {}_eventsCount: 0_filters: null_height: 752_lastBoundsID: -1_localBoundsRect: null_mask: null_sprites: [Sprite]0: Sprite {_events: Events, _eventsCount: 0, tempDisplayObjectParent: null, transform: TransformStatic, alpha: 1, …}length: 1__proto__: Array(0)_twh: (2) [48, 48]_width: 944cacheAsBitmap: (...)filters: (...)height: (...)localTransform: (...)mask: (...)pivot: (...)position: (...)rotation: (...)scale: (...)skew: (...)width: (...)worldTransform: (...)worldVisible: (...)x: (...)y: (...)_tempDisplayObjectParent: (...)__proto__: Container
OcRam_Lights.js:1105 OcRam_Lights : light_bg Array(2)0: "#303040ff"1: "0"length: 2__proto__: Array(0)
OcRam_Lights.js:1105 OcRam_Lights : Tint started! #303040ff, 0
OcRam_Lights.js:1105 OcRam_Lights : Tint done! Objecta: "1.00"b: 64g: 48r: 48__proto__: Object
OcRam_Lights.js:1105 OcRam_Lights : light_player Array(3)0: "1"1: "1"2: "#ffffffff"length: 3__proto__: Array(0)
OcRam_Lights.js:1105 OcRam_Lights : light_event Array(4)0: "6"1: "2"2: "400"3: "#ff80000ff"length: 4__proto__: Array(0)
rpg_managers.js:1949 TypeError: Cannot read property 'offset' of undefined
at exParamCopy (OcRam_Lights.js:1296)
at Light_Data.initialize (OcRam_Lights.js:725)
at new Light_Data (OcRam_Lights.js:717)
at Game_Interpreter.pluginCommand (OcRam_Lights.js:404)
at Game_Interpreter.command356 (rpg_objects.js:10508)
at Game_Interpreter.executeCommand (rpg_objects.js:8930)
at Game_Interpreter.update (rpg_objects.js:8838)
at Game_Map.updateInterpreter (rpg_objects.js:6115)
at Game_Map.update (rpg_objects.js:6022)
at Scene_Map.updateMain (rpg_scenes.js:608)
SceneManager.catchException @ rpg_managers.js:1949
Cheers