- Went to moodle to check assignments for the day
- Assignments are :
- Continue working with outpost model
- Ch. 5 prefab collection, HUD ???
- Actual assignment is to continue what we were doing last class and as hw
- Blyth checked my blog
- So I opened up the file on my hard drive
- There were a few typos in the code that I hadn't noticed
- Fixed the typos and the code was fine
- I saved the project then the scene (which was a bad idea)
- Closed Unity and transferred the whole file onto the computer's hard drive
- It was a completely different saved version and did not have the corrections that were made to it and the script had different problems now.
- So I closed Unity for a second time and reopened the file on my hard drive
- That file was fine so I'm just going to work off my hard drive for the sake of time, if it starts running slow or I start having problems then I'll move a copy onto the hard drive on the computer
- I noticed that in the 3 times that I tested it in play mode I couldn't get the door to open at all so I rammed it pointlessly in my frustration at first then checked to see if the script was applied to the first person controller like I had saved it as and it wasn't
- On top of that I decided to check trigger is for the box collider on the door, and to change the scale of z as well
- Dragged and dropped the audio files from the assets folder to the Door Open Sound & Door Shut Sound drop off points and saved (scene then project)
- Played/Tested
- Door still won't open, but with trigger on the First player controller can walk through it
- It turned out that the problem was the missing audio source that had to be dragged in to the first person controller rather than into the sound slots allotted
- Moved on to Ray casting
- I already know how to comment out script so I left that part of the script alone for now, if it ends up that I need to change it then I will at that time
- Added the scripting for the Ray Casting
- Went to play came across errors that I didn't notice upon saving the script, more typos that I found and corrected and tested by playing the game
- Starting chapter 5
- Checked off the trigger is box in the box collider
- Imported Chapter 5 assets
- Placed it & scaled it
- Created a new script called RotateObject
- Wrote the script and applied to the prefab (all the battery objects have the script)
- Created a GUI Texture and applied the battery_nocharge texture to it
- Tested to soo if the rotation script worked, it does
- Set the X and Y axis positioning (which is different from what is written) to X= -740 and Y = -280
- Created new script file called BatteryCollect
- Completed the script writing and corrected errors found by the console
- Opened the folder called textures in the project panel and I'm leaving off on the next step which is called Battery Collection with Triggers
- Blogged (throughout class)
Hw:
- Continue working on chapter 5 (shoot out email if there's a problem) [Due: Tues March 1st 2011]
No comments:
Post a Comment