- Home /
Shuttle Runs & Counter
This is more of a “What’s the best way to do it” than “How do I code it” (Though coding would be grateful, while I am getting more self-sufficient, I am still pants if I do anything more than modelling.
In my game (its 2D) I would like the character to move between two spots, as the title suggests, in a shuttle run.
When the player this the first spot, I want a counter (and displayed counter!) to rasie, and become inactive, and the opposite trigger to become active.
The same would be the same – making the other trigger inactive until that again, is triggered.
My ad-hoc way of doing this is using animation states and colliders that move up and down. Hit one, moves the other into place and itself out the way, while raising the counter. Set a variable to each other, bam.
In my head that works, but I thought I would ask the experts, as you have been good to me in the past!
(Quick tack on – so not to waist valuable unity answers space. Is it possible to measure the distance travelled on a particular axis and display it on the HUD Either with onGUI or GUIText and code.)
Your answer
Follow this Question
Related Questions
count the number on enemyes entrering into a trigger 1 Answer
Only tagged objects raise counter 1 Answer
Activate script when player enters trigger zone. 2 Answers
activate audio / animation on trigger 2 Answers
Lap timer using colliders 1 Answer