- Look at both the snap shot of the Hierarchy Window (Caption A) and these lines from the "SpawnManager" script (Caption B). Assuming all other lines of code are correct, why will this game not run properly? Explain. (Minimum 2 sentences)
Answer the following questions (go back and look at your Unity Project if you need to; scripts, scenes, etc.) 2. In order to reset the position of the background (like you did early on in Lesson 3.2), which of the following commands did you need to include in order for this to take place: (a) transform.rotation, (b) transform.position, (c) transform.translate. Explain your answer (Minimum 2 sentences). 3. In order to avoid having your obstacles float away when spawning during game play (and instead have them attached or static on the ground), there was something you changed in the Inspector Window to prevent this from happening? What component in the Inspector Window did you go to to make this change and what exactly did you change? (Minimum 2 sentences) 4. You learned of a third type of variable in this lesson (boolean or "bool"). What is the difference between the three different types of variables you have learned so far (int, float, and now bool)?
78 Comments
Nicholas Kolling
2/20/2020 08:10:40 am
1. In the script, it is trying to find the GameObject named "Player" but in the Hierarchy Window, there is no "Player." It would have to be changed to "GuyWithMohawk" if it wanted to find that specific GameObject.
Reply
Khristopher Manns
2/20/2020 08:10:52 am
1. This script will not run because of the name. The name of the gameobject is different from the name tag in the script, which needs both names to be the same to work.
Reply
Kaylie Ruffner
2/20/2020 08:12:25 am
1) Yes, that code is correct.
Reply
Ryan Theo
2/20/2020 08:12:33 am
1. It will not run because it is in the start void instead of the update. It is not in the correct prefab./
Reply
Rebecca Horvatich
2/20/2020 08:13:49 am
1. It doesnt work properly because there is nothing in the Spawn Manager.
Reply
Ryan Anderson
2/20/2020 08:14:03 am
1. The game would not run because of they are not called the same. Or the capitalization could be off.
Reply
Zachary Tierney
2/20/2020 08:15:29 am
1. Well it would need to named player and not GuyWithMohawk. If it is not named player the script will fail.
Reply
Jenny Vang
2/20/2020 08:16:27 am
1.) The game will not run properly because the script is looking for the Player in the hierarchy however, in hierarchy the player is under "GuyWithMohawk" not "Player".
Reply
Michelle Thongchine
2/20/2020 08:16:27 am
1. The game will not run properly because the GameObject.find"Player" is invalid. In the hierarchy window, there is nothing named as "player", resulting in the game not properly running.
Reply
Tanner Braun
2/20/2020 08:16:37 am
1)The game won't run properly because the name of the player is not the same in the code. In the hierarchy is say GuyWithMohawk and in the code it says player.
Reply
Jack Channell
2/20/2020 08:17:10 am
1. Guy with Mohawk is not labeled player. The script is looking for a player game object and since there is none it can not spawn anything.
Reply
Michael Parker
2/20/2020 08:17:20 am
1. there is no time limit for the start and stop. Also there is no player in the hierarchy so it wont work.
Reply
Melissa Bryan
2/20/2020 08:17:30 am
1) The box needs to be blue and it also needs to be updated.
Reply
Trenton Hickman
2/20/2020 08:17:35 am
1. The game won't run correctly because the script is attached to the wrong component. It's attached to the light, not the spawner.
Reply
Alec De Leon
2/20/2020 08:17:41 am
1. The game will not run properly because the player game object isn't named player like it is in the code. The script will then not register for the player and the code will not work as intended.
Reply
Mohammed Raza
2/20/2020 08:17:49 am
1) This game will not run properly because GuyWithMohawk is not labeled correctly in the script. "Player" needs to either change to GuyWithMohawk, or vice versa.
Reply
Anabelle Casavilla
2/20/2020 08:17:54 am
1.The game will not run properly because of the place it is inserted into. It also can't be used with a player controller script directly inserted into the code.
Reply
Sharon Lu
2/20/2020 08:18:12 am
1. The game will not run properly because "GameObject.Find("Player")" the player does not exist. In this case change "Player" into GuyWithMohawk as that's the player.
Reply
Samuel Natividad
2/20/2020 08:18:55 am
1.The spawn manager needs to get a prefab so it can be called upon and spawned repeatedly. There is no need for the second line of code.
Reply
Valerie Koontz
2/20/2020 08:19:15 am
1. why the code run correctly is because the script is attached to the wrong component. It is attached to the light, not the spawner.
Reply
Matthew Torres
2/20/2020 08:19:32 am
1. No it won't work because the character is named Guy with Mohawk and in the scripted it is referring to player. But there is no game object named player the script won't apply to the character and the scripted won't work.
Reply
Lucky Shipp
2/20/2020 08:21:19 am
1. cause the "GuyWithMohawk" should be named "Player"
Reply
Amy Zhang
2/20/2020 08:21:33 am
1. This game will not run properly because there is no Game Object named "Player" in the Hierarchy Window. The Game Object in the window is named "GuyWithMohawk", so the script would have to read "GameObject.Find("Player")".
Reply
Joshua Su
2/20/2020 08:24:06 am
1. The game may not work because the obstacle isn't put as the game object in the spawn manager. The obstacle needs to be put into the spawn manager or it won't know which game object to create.
Reply
Mike Klump
2/20/2020 08:25:20 am
1.They probably didn't add the script to the right object. 2. B, because it had to do with positioning the background and it was used frequently in a script. 3. A SpawnManager script to repeat and a PlayerController Script to keep the obstacle on the ground. 4. Here's the things that these variables do. Bool: Keeps what ever the script is attached to on the ground. Int: If I remember the last time we used it, it had to deal with numbers. Float: The variable contains a numeric value stored in floating point.
Reply
Makayla Vazquez
2/20/2020 08:39:27 am
1.) The script won't work because the player isn't name correctly in the hierarchy window. It won't work because in the script it say's " Player " and in the hierarchy window it say's Guy With Mohawk.
Reply
Max Alonzo
2/20/2020 08:42:59 am
1. It will not run properly because the player is called Mohawk guy. You would have to change one of the names to fix this.
Reply
Trenton Mcclure
2/20/2020 11:24:37 am
1: There is no ) for the " "
Reply
Mykael Byrant
2/20/2020 11:28:42 am
This game will not run properly because there is nothing in the hierarchy window that is labeled "Player". If you renamed "GuyWithAMohawk" to "Player" it would work properly.
Reply
Braden King
2/20/2020 11:28:52 am
1. In the hierachy window the character is named "GuyWithMohawk" and not player so it wont run correctly.
Reply
Ashton Herrera
2/20/2020 11:29:10 am
1. The Capitalizing of the p on "PlayerController"
Reply
Neil Chen
2/20/2020 11:30:26 am
1. The character is not called "player". Because the character is not named player, then the script will not be able to find the "Player" and will not run correctly.
Reply
Victor Hernandez
2/20/2020 11:30:47 am
2.Using transform.position
Reply
Jonathan Waddell
2/20/2020 11:31:43 am
1. The game will not run properly because the name of the object in the code does not match the actual player. The players name should be GuyWithMohawk in the code not player.
Reply
Jules Dachino
2/20/2020 11:32:00 am
1. The script won't run due to the script looking for "Player" while the actual player object is named "GuyWithMohawk". Since the names do not match, the script cannot find the object.
Reply
Antonio Alfaro
2/20/2020 11:32:09 am
1. the Playercontroller is = to the GameObject
Reply
Camille Hill
2/20/2020 11:32:28 am
1. The "P" in "PlayerController" needs to be lowercase.
Reply
Cole Flaugher
2/20/2020 11:32:38 am
1. The game will not run because the player is not defined. I believe that the player is meant to be "GuyWithMohawk", in which case the script should state "GuyWithMohawk" and not "player".
Reply
Frank Farrugia
2/20/2020 11:32:46 am
1. There is a capital P in player controller. There needs to be a lowercase.
Reply
Jonathan Sanchez
2/20/2020 11:33:33 am
1. It won't run correctly since the name in the quotation marks doesn't actually match the name in the hierarchy. Therefore the game won't run the way it's intended.
Reply
Jason Barela
2/20/2020 11:34:47 am
1. The game will not run properly because the player prefab is not named to Player. Instead, it is named as GuyWithMohawk so the Script Manager cannot find it.
Reply
Ely Ruiz
2/20/2020 11:35:15 am
1. The game won't run properly because the cripts calls to "Player," while in game the player models name is "GuyWithMohawk." The script will be calling to something that doesn't exist.
Reply
Jessica Barreto
2/20/2020 11:36:14 am
1. It's not running properly because the player is not named player, it's named Guy With Mohawk. If you changed the word player to GuyWithMohawk it would work.
Reply
Alex Smith
2/20/2020 11:36:39 am
1) It wont run properly because the player character is not named "Player", like it references in the code. Since the names do not match up, the script cannot find a game object named "Player".
Reply
Kylin Bilderain
2/20/2020 11:37:24 am
1. Your player could not be called "Player" but something else. Its really a simple fix all you do is change "GutWithMohawk" to "Player" in your Hierarchy.
Reply
Brandon Ilori
2/20/2020 11:37:47 am
1. The game will not run properly because the code is on the directional light. The code is suppose to be on the Spawn Manager object.
Reply
Jaerik M.
2/20/2020 11:38:26 am
1. The reason why the game won't run is because of the name set for the player. You'd either have to change some of the code to say," Find("GuyWithMohawk") ", or change the name to Player.
Reply
garen
2/20/2020 11:38:34 am
1.Because InvokeRepeating should be on a separate line.
Reply
c@iden
2/20/2020 11:38:40 am
1. because the part that says player should say GuyWithMohawk instead.
Reply
Angelina
2/20/2020 11:38:46 am
1. The part of coding that says "Player" should change to "GuyWithMohawk". There is no component stating what player so the game cant run.
Reply
Mikey Rojo
2/20/2020 11:38:59 am
1. The first line of code is relating to the player object which the line doesn't match the name with what it states in the hierarchy window. The spawn manager has a player control line that it shouldn't be there and is missing a few lines of key components to the spawn script.
Reply
John Banzon
2/20/2020 11:39:37 am
1. The game won't run properly because the prefab GuyWithMohawk doesn't match with the word "Player" that the code is trying to find. Since they are different names, the code can't find its target. So you must change the code in quotation marks to GuyWithMohawk, or you should change the prefab's name in the hierarchy window to "Player."
Reply
Jun Gallego
2/20/2020 11:39:45 am
1. You have to put the object (GuyWithMohawk) in arrays inside the SpawnManager.
Reply
Brian Wilde
2/20/2020 11:39:52 am
1. It will not read the "Player" cause the "Player" is called "GuyWithMohawk" meaning the script will be searching for "Player" when "Player" does not exist.
Reply
Ben Morales
2/20/2020 11:40:35 am
1. The game wont run properly because the player is labeled "GuyWithMohawk" instead of player. In the code, the player is referenced as "Player" and so it is looking for an object named "Player".
Reply
Seamus Terry
2/20/2020 11:56:05 am
1. The script has the GameObject as "Player". However, on the Unity side, the object it named "GuyWithMohawk", so the script won't run.
Reply
Mykael Byrant
2/20/2020 12:16:17 pm
1. In the hierarchy window the "GuyWithAMohawk" should be called "Player". If you changed it to "Player" your game would work.
Reply
Giovanni Santos
2/20/2020 01:58:32 pm
1. u have to separate the coding so its not mixed up. there is no public variable or private
Reply
Raymond Liu
2/20/2020 02:02:39 pm
1. The game won't run because he didn't rename the character "player". This causes the code to not work since there is no player.
Reply
Jaylen Williams
2/20/2020 02:02:59 pm
1. The Code is looking for an object named player but their isn't one. The GuyWithMohawk needs to be renamed Player.
Reply
Jayden Zhang
2/20/2020 02:05:49 pm
1. The reason why is because the script is looking for a "Player" and there is nothing like that in the hierarchy view. In order to fix this you need to change "GuyWithMohawk" to 'Player"
Reply
Emry Gurule
2/20/2020 02:05:57 pm
1)The player needs a name.A guy with a Mohawk isn't gonna work.
Reply
Aidan Hsu
2/20/2020 02:06:07 pm
1. The character model is still named GuyWithMohawk. The script is looking for an object named Player.
Reply
Abhinay
2/20/2020 02:06:17 pm
1. This game might not run properly because you haven't dragged the prefab into the spawn manager. This could cause it to not spawn the prefabs.
Reply
Enrique Wicochea
2/20/2020 02:06:26 pm
1) The first problem is that the object's name is "GuyWithMohawk" while the script calls for "Player". If they don't match the game won't work properly.
Reply
Aanchal
2/20/2020 02:06:47 pm
1.It won't work because in the GameObject.Find("Player") it is supposed to be GuyWithMohawk. It won't work because they don't match and it would not call the right script.
Reply
Allison Hernandez
2/20/2020 02:07:06 pm
1) It wouldn't work because in Caption A the player is called "GuyWithMohawk" and for the script to work you need to replace Player with GuyWithMohawk.
Reply
Jacob King
2/20/2020 02:07:45 pm
1. You have to change the guys name or else its not going to function right
Reply
Arnav
2/20/2020 02:08:52 pm
1. The guy in the inspector is named guy with Mohawk and not player
Reply
Angel.M
2/20/2020 02:11:25 pm
1.The game wont run properly because there's an error. In the first line on Caption B at the end of Player controller there nothing inside these >(..).2.Transform.Position is the one. Transform. Position because that's what changes the position.3. You need to add a rigid body. You will need to freeze the x,y etc. The difference from the new variable "bool'' is we never used it before and its for different settings.
Reply
Terry
2/20/2020 02:11:55 pm
1.) There is no game object. They should have a game object called player. The script is trying to find a game object named player.
Reply
Zac
2/20/2020 02:12:17 pm
The script will not run properly because there is no player in the game so this script is useless. the script you need to add to reset the camera angle is transform.position. You need this because it resets the camera angle every time. we added a script that makes the gravity so you cant double jump and float away. we learned about a lot of variables. some new ones we learned were If, float, and Get.
Reply
Quinlan
2/20/2020 02:13:10 pm
1. The names in the quotation marks do not match the hierarchy window prefabs. They need to match in order for the script to run.
Reply
Mia Cieslak
2/20/2020 02:13:29 pm
1. This game would not run properly because the model labelled as "Player" in the code is labelled differently in the Hierarchy Window. The GameObject.Find command only works if the name given to the code is the same one given to the prefab/model that the programmer wants to call.
Reply
Elijah Pallay
2/20/2020 02:28:04 pm
1. This script wouldn't run properly because there is no "Player" in the hierarchy. We would have to use "GuyWithMohawk" for the computer to understand.
Reply
Yannick
2/20/2020 02:29:14 pm
1.) There is no game object named player. The script is trying to find a game object named player.
Reply
Jozelynn Sandoval
2/20/2020 02:32:14 pm
NO.1- The Player is "GuyWithMohawk" instead of Player in the window.
Reply
Cherydin Green
2/21/2020 09:13:02 am
transform.position because we are talking about position so that was the key word so i picked B. use rigid body to make it not float away and to stay in the same spot. rigid body will keep it in the same spot if were talking about keeping it on the ground. i think bool was to control something else i don't remember using the bool in my script so i don't know what to say about it.
Reply
Your comment will be posted after it is approved.
Leave a Reply. |
Daily BoOT Ups (Video Game Design I)Directions: Archives
March 2020
Categories |