- Home /
I want to Make missions without leaving a scene.
Can someone please tell me how i can make a simple mission trigger(like in gta) that wont take me to a new scene but will start a mission? please please please!!!!!
Answer by BerggreenDK · Sep 28, 2011 at 09:33 AM
This is not a simple question. But I will try to give you a quick overview of my idea anyway:
1) you need something that holds all your missions.
2) you need some sort of trigger system that you can place into the levels/maps
Once you activate these triggers, you use the triggers ID or value to lookup in the mission list.
Depending on your type of game triggers could be used to either trigger the next mission no matter which trigger is activated or you could have different triggers for same mission or just one trigger for one mission.
It all depends.
Next, every mission. What does it consist from? An objective? yes, some sort of discription, probarbly. What else? What do you need to show the mission to the player?
Once you have decided on all this, you should make a datastorage/array/class/structure where you can store all your missions and give them unique ID's.
Then you you will make some sort of trigger. It could, in Unity style, be a simple Trigger.cs script where you have a public variable that you can set individualle pr. object, once its dragged onto the gameobject.
Then on the gameobject you activate the Collider which is invincible. You can scale this one to fit your "trigger area".
On the player, you need a RidgeBody because this will trigger the Collider on the "target".
So in the trigger script you sit and wait for collision/trigger and once you get it, you take the "mission_id" variable and use it as paramter in a function call to the MissionController class.
The MissionController.cs class should then pause the game (if you need that) and then show the mission until the user click it away...
...
again, all this is just ONE way of doing it.
Let me know if you have trouble understanding it or you succeeded.
forgot to mention, your mission controller should also keep an eye on the "objectives" - to check if they are fullfilled or not. So once the mission is activated, its up to $$anonymous$$issionControl to check in the Update loop or... to give the player the "objective data" into the players structure. Your choice of architecture.
Oh and if you where wondering im making a free roam game like gta. is that possible with unity? i hope it is i have so many ideas. Oh and how would i creat a mission? like an objective
describe what you think is needed for an objective, then we can sort it out together. But post it as a new question and mark this one as the right answer if my answer was the correct one. thats how this community/forum works. :o) also check the FAQ if you are in doubt.
Thank you so much by the way. I know how to make a trigger but how would i get it to call the mission up? so sorry if these are dum questions.
Your answer
Follow this Question
Related Questions
Making a game like gta 2 Answers
Weather for game 1 Answer
mission help 1 Answer
3 years of expirence 0 Answers
gtting in a car and radio stations 2 Answers