PlaceholderGames / 2021-yr2-group-2

CS2S561 2020/1 Group 2
2 stars 0 forks source link

Basic Social Encounter #9

Closed IJCoding closed 3 years ago

IJCoding commented 3 years ago

Aside from the platforming having sections blocked by social encounters is also key to the game. A social encounter should block off part of the map until it is acquired.

IJCoding commented 3 years ago

image

Making an area blocked until player interacts with the NPCs

IJCoding commented 3 years ago

Had to restart

IJCoding commented 3 years ago

image

Made an NPC (a player without the player Control script - but an NPC control script)

IJCoding commented 3 years ago

image

New variables to store previous targets/pivot

IJCoding commented 3 years ago

image

Functions to take / return control of the camera

IJCoding commented 3 years ago

image

Script for the npc to take and revert control of the camera

IJCoding commented 3 years ago

image

NPC becomes target of the camera when entering

IJCoding commented 3 years ago

image

And is no longer the focus when the player leves

IJCoding commented 3 years ago

image

NPC rotates like during dev of player - will re-read old fix

IJCoding commented 3 years ago

image

After reading old issue https://github.com/PlaceholderGames/2021-yr2-group-2/issues/30 realised i shouldnt be changing the pivot

image

Removed references to pivot in NPC script

IJCoding commented 3 years ago

image

Realised I should make pControlled false - when the camera is no longer player controlled (may find way to automate this)

IJCoding commented 3 years ago

image

Camera now slowly rotates to focus on the NPC in question

IJCoding commented 3 years ago

Testing to see if it works with height

image

image

works as intended

IJCoding commented 3 years ago

image

Added a way to automatise the finding of cameras - changed the name of the NPC control scrip to CameraSize (so it can be used for other items easily)

IJCoding commented 3 years ago

Social encounters are no longer being used but the camera focus may be used at a later date.