SGD300 - week 5 Devlog
Introduction
This week I will be continuing to work on the pickup script implementation. I will also begin to look into changing the cursor to signify a change in action. The cursor will change when an enemy is hovered over, when an item can be picked up, when an NPC can be interacted with. These cursors will change back to a default/main cursor when the mouse is idle on the ground layer.
Goals
1. Continue working on Pickup Script
2. Begin looking into the cursor state implementation
3. Research how to use and change cursor depending on action that can be taken
4. Find different cursors from the unity store
5. Create a script that can change the cursors when hovering over an enemy or object
6. Link that script back to the inputs
Personnel
Primary - Nathaniel Hughes
Technologies, Tools, and Resources used
Provide resource information for team members who wish to learn additional information from this log.
* [RPG Cursor Assets](https://assetstore.unity.com/packages/2d/textures-materials/basic-rpg-cursors-139404)
*[Unity Cursor Manual](https://docs.unity3d.com/ScriptReference/Cursor.html)
*[RPG Cursor Tutorial Youtube](https://www.youtube.com/watch?v=IvRPafK_Bwc&t=86s)
*[Cursor Hover Tutorial Youtube](https://www.youtube.com/watch?v=26D7MpHJJSU)
Tasks Undertaken
1. Find Cursor Assets in the Unity Store
2. Set a main cursor that will be set when the game starts
3. Update the cursor with a movement based cursor when the user clicks on the screen. Add a delay before switching back to the main cursor
4. Create an interaction cusor that will handle the pickup interaction and/or the ability to click on npc
4. Add an attack cursor that can be used for the Attacking script
5. Continue working on the pickup method within both the pickup script and the player input script.
What we found out
I have found that i don't truly understand how the switch statement works within unity. During class I discovered that the Layers work on a numeral system for example the ground layer was in 8th place therefor the switch statement for that layer was 8.
I changed the cursors removing the MOvement cursors because it was decided that the movement idicator will be a flash at the mouse location to give the player feedback on where the character should be moved to. Each switch statement will start by setting the main cursor chosen for the game, followed by switching the mouse when different events occur. When an interable object is hovered over he interaction mouse will be shown and when an enemy is hovered over the attack cursor will be added to inndicate who can be attacked.
Setting the cursors is very simple all you need is a referenced that can be accessed by the editor to set your cursor sprits and a method called Cursor.SetCursor();, that uses the cursor reference the hotspot(the location where the click will be triggered and the cursor mode most likkely set to auto).
The pick up script was mostly completed by Jacob who added the ability to add the items to the inventory if there is space or leaving the item on the ground if there is no available room in the inventory.
Solution Justification
Cursors are an important way to display both information and action that can be executed on the screen. These cursors will allow the player to know where they can move, who they can interact with, who they can attack, what they can pickup. Cursors can also help display useful information about an item, or an enemy without having to actually interact with the enemy of the items in question.
Get SGD300
SGD300
Dev Logs for SGD300 Project
More posts
- SGD300 - Week 13 DevlogOct 24, 2019
- SGD300 - Week 12 DevlogOct 24, 2019
- SGD300 - Week 11 DevlogOct 13, 2019
- SGD300 - week 10 DevlogSep 29, 2019
- SGD300 - week 9 DevlogSep 22, 2019
- SGD300 - week 8 DevlogSep 14, 2019
- SGD300 - week 7 DevlogSep 05, 2019
- SGD300 - week 6 DevlogAug 29, 2019
- SGD300 - week 4 DevlogAug 15, 2019
Leave a comment
Log in with itch.io to leave a comment.