Hello. Do I want to know how can I tell to my players where they have to go? I have a little spaceship game that it needs to fly from planet to planet, so I want to tell the player that it needs to go to that specific planet. (Basically telling them that you need to go from Point A to Point B). How can I randomize this mission system? Like Saying, you are now on the earth, please Go to Neptune.
Iâm unsure if this will fully answer your question, which at its core sounds like âHow do I choose a random element from a collection?â.
From what you put forward as your example, with a list of possible locations, while youâre at one, you could remove/ignore that particular place, and choose a random integer to use as an index for the collection.
Yeah! you are getting there : D. Well, think about this. You are in a spaceship in our solar system. And you have to go from Mercury to the Earth, well, you go there. Then the game tells you to go from the Earth to Neptune, you go there. How can I do this?
and how about if I just update the text after a certain amount of time passes? for example, Say, âGo to Marsâ after some time, it says, âNow, go to Neptune.â How can I do that? I donât know how to update the text after a certain amount of time passes.
Maybe just set a ânextUpdateâ float variable which could be Time.time + a variable float for how many seconds you want until the next mission update. Time.time is the current time, so if you add â10â for example, the nextUpdate variable would be 10 seconds in the future
Maybe from what youâve shared, youâd want to set the next time to some amount after they arrive at their current destination.