Hello everybody!
Today I followed a tutorial by FriendlyCosmonaut for I was in much need for a more precise room transition to go back and forth varius rooms. Still I have to adapt the code for better suit my need but this is a good start.
Threespeak problems
First off I want to ask if anybody is having issues with @threespeak I had to resort on Youtube because the site don't load for me. I much prefer having stuff on the blockchain and 3speak was working really nice for me in the last months.
If somebody has a solution or maybe is just a connection problem from Europe?
Well anyway let's get on the code.
CREATE EVENT FOR PERSISTENT OBJECT
Here we set the variables for the DrawGui event and the information that has to be passed to the collider/player object. This object has to be persistent to allow the code to run from room to room.
DRAWGUI EVENT FOR PERSISTENT OBJECT
This is where we set the variables and the look for the transition. How long it last, the color. Eventually one can change even the shape.
STEP EVENT FOR PLAYER/COLLIDER OBJECT
This is the code that start the transition when colliding with obj_transition or what is actually the door object that take you to the next room. The obj_transition have to be modified each one with their specific targetroom. You can do this by selecting the instance that you want and then go modify the target room in the Creation Code menu that is unique to any specific object of that kind.
Here's a little showcase of how it work in game.
I'm now keeping a file with all the useful code that can be found in many games. Often I find myself opening old projects to recall how I did add a particular feature, so having the most useful ones in one doc is gonna help a lot.
I still have to modify this code because for the case of the physics project game in wich I have 3 object that work as part of the player object( one for the camera, one for the activation of the player object and one is the player object choosen) I have to find a way to make the transition from one room to another to make the game as seemless as I like!
Have a nice day devvers :D馃槃