First up is a build with a working version of the selection mechanic, as outlined in the previous post.
There's a (very placeholder-y) HUD in this build that allows the player to switch between Otis and Fawn as well as move the selected character around the level.
It took me FOREVER to figure out how to make this work; the GetGUIElementHitTest action I tried to use initially didn't do anything at all. In theory, it should have been able to tell if a left button mouse click had hit a GUI texture and fire an event... But no. I ended up having to place invisible buttons on top of the character icons; this worked much better.
When the player clicks either icon a state machine sends a message to a character switcher script that says "oi, this character is active now!", which then sends the same message through to the movement script.
The HUD textures are pixelated. I honestly have no idea why they're doing this - the alpha channel looks fine in Photoshop. I'll have to investigate. But this is a great time to introduce the QA tab in Hansoft! At this moment I only have one bug, but I expect this number to increase very very much as I go along.
BUT THAT'S NOT ALL!
In THIS build the level has been zoned off to include this functionality:
I realise that these floaty splines aren't the prettiest or most elegant solutions, but they'll have to do until I find the time to create some animations.
...BUT THAT'S NOT ALL EITHER!
With both characters moving around the level it was super easy to add a little distance check between them.
Download this build to see the light/dark change!
The ambient light colour is changed over a time of two seconds, as is the main light in the level and the colour of the fog.The skybox also changes, but in a very abrupt and horrible way since I don't think there is a way to make it fade to another. I'll have to get rid of the skyboxes and use planes instead, and hopefully there is some way to fade between textures to make it a little bit smoother.
Phew! Good progress, I'd say. Next I'll have to tackle the inventory and items in the level, as well as the cameras. It's becoming increasingly clear that the game will be quite unplayable with a static camera... The angle of the camera means that it's hard to click certain areas to move there, and that the candles on the wall along the bottom won't be visible and thus impossible to use. I'm thinking either a zoomed in camera that follows the selected character, or a solution that blends between different static cameras depending on where the selected character is. We'll see.