Alpha
I was given by my environment artist an updated greybox for the level. I was also given constructive feedback from the last greybox level from other game designers. Listening to their comments I adjusted the cameras to allow easier movement around the level. I also made sure all cameras have ignore raycast activated, as the target interfered and got stuck on the triggers.
I then started to work on my inventory. I first created inventory slots by creating images and placing them on the far side of the level. I added myinventorymenuscript and event triggers. For each event trigger I attached the script and activated each void function within the script (down, drag and up). This allows the items to be dragged to and from the inventory. I also created an empty object and attached the myinventoryscript. This identifies where to send the sprite images to.
I then created a mykeyscript, mylockedscript and DoorUnlocked scripts. This allows the keys to only work when they are picked up and dragged from the inventory and onto the locked objects.
I then created a grabbanddropscript which allows the player to pick up objects.
After I got the inventory working I wanted to improve the interaction with my keys. I wanted the key to appear and rotate in front of the camera to allow the player to examine what they have collected.
I created and attached a empty object with a trigger box onto the main camera. I then created this script to allow the object when called to appear in the trigger box.
However I found out that by calling the object in the keyscript instead it was much easier and worked a lot better as well.
I then added a rotation script which allowed the object to rotate.
For the volume I wanted to be able to turn the volume on/off throughout the game. I wrote this script and attached to a prefab. The prefab also contains the main camera and it's child components. The reason why I had to create a prefab was because the script calls for the main camera's audiolistener and turns it on/off when called. I have to add the prefab to all scenes otherwise the script will not be able to identify the audiolistener.
No comments:
Post a Comment