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:
Files
Get Volatile
Volatile
Status | In development |
Author | Boaan |
Genre | Adventure, Action |
Tags | 2D, Action-Adventure, Aliens, Singleplayer, Space, spaceship, Story Rich |
More posts
- Update to version 0.0.2.7Oct 15, 2022
- Hotpatch v0.0.2.6Mar 16, 2022
- Demo now available!Nov 02, 2021
- New WeaponApr 21, 2021
- More Shell assetsApr 18, 2021
- Worldbuilder!Mar 21, 2021
- First Shell MinibossMar 14, 2021
- Dev Stream March 9th 2021Mar 14, 2021
- Laser Turrets!Mar 07, 2021
- Dev Stream March 2nd 2021Mar 04, 2021
Leave a comment
Log in with itch.io to leave a comment.