Hi everyone,
I'm using monkey_05_06's Flashlight module and this specific problem keeps happening:
With the flashlight active, I go from room to room without a problem. But there's a particular room (that happens to be exactly like the others (it has hotspots, objects, nothing out of the ordinary)) that keeps crashing the game and giving me the following error:
(https://i.imgur.com/OxlHPzX.png)
It points to this line:
ViewFrame *frame = Game.GetViewFrame(this.FollowingCharacter.View, this.FollowingCharacter.Loop, this.FollowingCharacter.Frame);
I've made sure the flashlight is following the player and I'm calling the update on the problematic room and the ones adjacent to it, but the result doesn't change.
//global script @ game_start
Flashlight.SetFollowCharacter(player);
//room script @ room_Load
Flashlight.Update();
Already tried to delete and recreate the room, but still...nothing happens.
Has anyone have any idea on what's happening? ???
Turns out the error was somewhere else: accidentally typed "eDirectionDownRight" when changing rooms, but I don't have diagonals. Fixed to "eDirectionRight" and everything works (nod)
I guess AGS shouldn't set a character's .Loop to an empty one; or Game.GetViewFrame should fall back to null.
Quote from: Khris on Sat 21/10/2017 14:01:21
I guess AGS shouldn't set a character's .Loop to an empty one;
The rules for this changed over time. When I was helping restore compatibility with pre-3.0 games, I found that earlier versions of AGS actually did fallback to another loop, but that was changed later for some reason.