Journal Entry 3
Date: 11.3.2024
Activity:
- Went throught all steps in both documents of scripting tutorials
- Built the game with finished shooting mechanics
Notes:
The provided tutorials very helpful, clear and easy to follow. Even then I've encountered various small issues while going through them.
First was a warning when applying Bullet material to the bullet prefab. But everything seemed to work properly even with this warning so I left it there:
Next I struggled a bit when trying to set a different bullet variant. I was trying to call the method directly on bulletSpawned (as the tutorial instructed) which didn't work, but all I needed to do was get the BulletController component. I also had a different issue with this method - in it I was altering the speed of the bullet. But a default speed was also being set in the Start method which (as I found out) runs only after it. My temporary fix was to comment out the speed change in Start and everything worked.
My last issue was an error "Object reference not set to an instance of an object" when trying to break the column into parts. I've managed to fix this by having columnParts be a GameObject type and then getting the right component with the Break method. But the solution provided in the tutorial was using the component type for columnParts and the getting gameObject to call SetActive method which didn't work for me (see error above).
This tutorial definitely helped me understand how objects in Unity interact with scripting and what is relatively simple to do (which was useful for my Project A).
Invested hours:
Scripting HW: 3.5 hours
Outcome:
Uploaded build of the modified game with my own shooting script to itch.io.
Files
Get Project T
Project T
mff-gdintro-2023-t
Status | In development |
Author | kruchi |
More posts
- Journal Entry 5May 28, 2024
- Journal Entry 4Mar 23, 2024
- Journal Entry 2Mar 02, 2024
- Journal Entry 1Feb 25, 2024
Leave a comment
Log in with itch.io to leave a comment.