Starcraft 2 GalaxyScript
Hey guys recently tried ripping a old game that i used to like that got bugged, just looking for some help on the coding side.
THE GAME: Just an explanation so you understand what the game is, basically it's a camera shifting maze runner, the camera moves with or without the player(s) while you follow the path with the screen without getting hit by spawned units or leaving the screen which triggers death/loss.
THE BUG: The bug is when you start the game, you spawn at starting point as soon as timer hits 0, camera moves to a different spot and you're dead.
Solutions I've tried: I removed the trigger to kill you when off screen, the camera pan moves how it supposed to be, does not jump to different spot. Now I can play but there's no death when you get off screen so no point to the game.
Where the problem is: I personal think the problem is within the camera coding, but I could possibly be wrong.
Original Code
https://prnt.sc/lmqi36
Altered code to make the game work
ORIGINAL FULL SCRIPT

Please take a look at the camera section this is where the screen jumps on the original code and triggers a loss
http://prntscr.com/lmqkip
If you can help me with this I'd appreciate it, I'll throw in a few bucks if you end up fixing this problem. Add me IM if needed or comment changes
THE GAME: Just an explanation so you understand what the game is, basically it's a camera shifting maze runner, the camera moves with or without the player(s) while you follow the path with the screen without getting hit by spawned units or leaving the screen which triggers death/loss.
THE BUG: The bug is when you start the game, you spawn at starting point as soon as timer hits 0, camera moves to a different spot and you're dead.
Solutions I've tried: I removed the trigger to kill you when off screen, the camera pan moves how it supposed to be, does not jump to different spot. Now I can play but there's no death when you get off screen so no point to the game.
Where the problem is: I personal think the problem is within the camera coding, but I could possibly be wrong.
Original Code
https://prnt.sc/lmqi36
Altered code to make the game work
Code:
//--------------------------------------------------------------------------------------------------
// Trigger: Left Screen
//--------------------------------------------------------------------------------------------------
bool gt_LeftScreen_Func (bool testConds, bool runActions) {
int auto80BD1FF7_ae;
int auto80BD1FF7_ai;
// Variable Declarations
int lv_a;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
auto80BD1FF7_ae = 8;
auto80BD1FF7_ai = 1;
lv_a = 1;
for ( ; ( (auto80BD1FF7_ai >= 0 && lv_a <= auto80BD1FF7_ae) || (auto80BD1FF7_ai <= 0 && lv_a >= auto80BD1FF7_ae) ) ; lv_a += auto80BD1FF7_ai ) {
if ((gv_playerDead[lv_a] == false) && (gv_inBetweenChances == false) && (RegionContainsPoint(RegionRect((PointGetX(CameraGetTarget(lv_a)) - 11.5), (PointGetY(CameraGetTarget(lv_a)) - 7.0), (PointGetX(CameraGetTarget(lv_a)) + 11.5), (PointGetY(CameraGetTarget(lv_a)) + 7.0)), UnitGetPosition(gv_runner[lv_a])) == false)) {
}
else {
}
}
return true;
}
ORIGINAL FULL SCRIPT
Please take a look at the camera section this is where the screen jumps on the original code and triggers a loss
http://prntscr.com/lmqkip
If you can help me with this I'd appreciate it, I'll throw in a few bucks if you end up fixing this problem. Add me IM if needed or comment changes