- Home /
mission help
Sorry i wasint really detailed in the last question. But when you have to protect your brother from the drive by i want there to be the brothers health bar on the screen abd words that come up to tell you what to do. Im not sure how i would make it to if the brother dies then the mission fails and if you protect him then the mission is passed and unlocks new missions. please help. Also how would i be able to make the main character die?
Also, how do i make a game?? Can somebody post the code plz!?
Rob, your question is really confusing. It sounds like you're trying to figure out very high level video game design questions without understanding the very basics. Check out the unity tutorials (http://unity3d.com/support/resources/) to learn the basic building blocks. They will $$anonymous$$ch you about GUIs (health bars and words on screen), scripts and variables (unlocking missions and making the main character die), etc. When you get to the point where you're unsure of how to do something in the unity editor or have a line of code that you just can't get to work, that's when folks on this forum will be able to help you.
People, ease up. He posted this question as a follow up to his previous question. @Rob9891 I think you should edit this question and make it more general, as there is no reference to the previous question here. But the problem is still solvable. Check my answer below.
Answer by BerggreenDK · Sep 29, 2011 at 07:56 AM
Again, your question is quite high-level as stated in the comments. You have to break it down into bits/blocks of code.
Lets assume you have build a MissionController class that handles which mission we are currently assigned to.
This MissionController handles a list of Missions (a data structure/class) and these can be placed in an Array/List of Missions.
To allow the flexibility of different missions, you first need to figure out what can be variable from mission to mission.
For a start:
Basic text/description gotta be different: But is it all parts of the text or only certain words? by replacing coordinates, names or items the mission could be all new without needing a full new text. Think this through.
Mission objectives: you need a way to make the program validate when the mission is done or a failure. So a list of Objectives/Goals ought to be part of the Mission class too. Perhaps you could model/write the Objective so that you can tell if its important for the whole mission or just a bonus objective. Secondly, you might also want to add a "point value" for completing the objective. Each objective should be easy to check with "IF (objective == true) " or something. Figure out what sort of objectives a mission could contain and make a class that will contain all these options (you could use a SWITCH... CASE structure for checking that) Once you have a list of objectives, then a simple "foreach loop" should be able to run through current missions objectives and return a true or false, or better yet - a state that tells if its "in progress", "failed", "complete" etc.
Unlocking new missions: if you implement the point value from 2.) then you could also make a "unlock value" and once a mission is completed, use that unlock value to set a state on another mission. This means that every mission by default should have a "state of lock/unlocked". If you open like the first 3 missions and then let each of them point to the next mission, once unlocked.. Then you have a mission tree quite quickly.
Making the main character die: okay, now we are focus on a whole new matter. If you mean our player, look for tutorials on how to build a basic FPS game. There are available tutorials for Unity3D already. No need to ask for that. If its your primary objective main character. You need something that shows he/she is dying/dead (animation or text) and then in your objective list you need something that can check if "PERSON xyz" is alive or not. That can be done with a "state/value/variable" again. Now you need a Person class that can handle every person in the game too. :o)
If you read all this, you should by now have figured out that GTA and similar games are MUCH MORE than just a dream of an idea. But just like eating an elephant is possible. Just remember to slice it up very good into very small eatable chunks. Your current perspective is WAY too high to solve in a simple manner.
My advice would be:
Learn more about Unity Input/controlling. Make a simple cube that you can "drive around" on a flat ground.
Learn about how to detect collision on objects, once you can control them. Build a test city with cubes for buildings and cars. Drive around and see if your program works.
Then implement the mission thing in a simple manner. Eg. make a cube that you need to drive into (pretend its a person that you should kill?)
Then begin to make other cubes drive around in your city by themselfs, so the city becomes alive. Once they do this you can start to assign THEM missions on what cube they should hunt and try to kill. And THEN you can make evasive manouvers to prevent that from happening.
Do you know how to make all this? if not, think smaller, start with something simple. Like Lunar Lander, Space Invaders, Pac-Man or similar old 80' games. GTA is NOT a simple start project.
,Ok i defintently will learn more . The only expirence i really have is a space game and a day and night cycle lol.
Heh, its always a good idea to start out with a simple simple arcade style game, then move on to some more complicated projects.
If you're really into making games i can recommend attending to gamejams, there'll be one in the beginning of 2012 named "global game jam"
you should give it a look if you want to create some small games :)
Good reply. +1 especially for the elephant analogy. :-D
Your answer
Follow this Question
Related Questions
I want to Make missions without leaving a scene. 1 Answer
How do I make a mission objective? 1 Answer
3 years of expirence 0 Answers
gtting in a car and radio stations 2 Answers
Mission Objective 3 Answers