- Home /
Creating a racing relay.
I'm not very good at coding and i'm having trouble trying to create a relay pass-over with 2 constantly moving runners.
What needs to happen is when the first runner enters the trigger a button needs to be displayed which changes color over time from red to orange to green to red when the player presses the button the next runner is spawned the camera switches to it and an appropriate boost or penalty is given depending on the color of the button.
So bullet-pointed that's:
runners "runner1"/"runner2"(Runner.js), 1 camera "mainCamera"(SmoothFollow2D.js), 1 trigger "relay1"(relayScript.js)
-OnTriggerEnter
-Color Changing button
-Spawn next runner
-Camera switch target
-Penalty or bonus on the next runner.
-Last runner destroyed
I have 2 days to do it so learning this from scratch is not much of a possibility.