Gates finally work!


I've been working on making sure the gates in the alien base work without a hitch and they finally do! I have a few objects that relate to showing a button prompt when you are near something you can interact with. I have one script that handles all these interactions, so I had to make sure the case scenarios were not overlapping.

The first bug that I encountered was that if I had docked into a base before trying to travel via a gate, it would cancel out the button prompt. While trying to fix that, I broke the actual gate script. To get the button prompt and be able to travel via a gate, the game verifies if you are close enough to a gate. But I had erroneously coded it so that the script only runs when the ship triggers the variable for distance. Therefore, as soon as the ship is further away from the gate than is required to trigger the button prompt, the script would stop and the ship would be stuck inside the alien structure's walls.

Fixing this issue was an excercise in frustration, as I'd fix one issue and cause the other to pop up again. Eventually I made a variable that is switched on when you are close to each gate, but is only switched off when you reached the destination. This also means I have to have specific variables for each gate, but since there is a finite number of gates, it's easier than trying to create an all-case script that I can use for any gate.


I'll be making a longer devlog and posting it here but for now you can find the video in the twitter post I made about it:

https://twitter.com/i/status/1365840397306576899

Files

Volatile.exe v0.01 196 MB
Feb 16, 2021

Get Volatile

Buy Now$14.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.