- bugfixes
- fixed bug: cannot shoot bow after dive roll
- fixed bug: upon player jump and aiming at self and shoot arrow - arrow goes the other direction
- fixed bug: sometimes player misses event on TakeArrow animation and get stuck in TakeArrow mode ( cannot shoot bow or do anything - reported currently only on Unity 5.5.1 ).
- fixed bug: been able to reverse on ledge even in front of wall.
- fixed bug: been able to go into strafe mode when on ledge ( Default Player Control ) which broke it - player starts rotating on ledge.
- changed pTakeArrow parameter to from trigger to bool so now if player misses event it will reach for arrow again ( and again repeat if event is out of range - if this bug show itself again - it will be obvious atleast). Also included method to check if TakeArrow animation is finished and event is missed. In that case method calls relevant event.
This method is commented - uncomment if you notice TakeArrowEnd event miss bug. ( cannot shoot arrows - m_RightArmOccupation == ToReachArrow )
- created 'PhysicsMaterials' folder and 'Flesh' material in it to use with characters and respond to arrow hits
- improvements
- optimized npcs:
- removed unity's Update() method from NPCScript and added UpdateNpc().
UpdateNpc() is now called from GuardZone if its visible by camera.
- removed unity's Update() method from TPCharacter which only called checkGroundStatus(). Now TPCharacter::checkGroundStatus() is called in user's Update method.
( in PlayerControl::Update(), PlayerControlTopDown::Update() and NPCScript::UpdateNpc() )
- added visibiltiy checks for guard zone and npc
- added possibilty to enable/disable guard zone collecting npcs on start ( if you want to assign npcs to guard zone manually )
- removed NPCManager npc array. Use GuardZone npc arrays.
- removed RagdollManager::Update() method which was updating custom velocities, now called by player control scripts by RagdollManager::updateCustomVelocities() and NPCScript::UpdateNpc().
- added possibility to enable/disable local avoidance, check for obstacles, npc blocking on npcs.
- added heavy attack - used by holding 'HeavyAttack' input button ( left shift by default ) + 'Attack' button left mouse button).
- NOTE: if adding another attack - create hash ID in HashIDs script and add it to AttackStates array.
- added possibility for npcs to traverse obstacles.
Drag TriggerManagement script onto them.
Currently tested: JumpOver, ClimbOn, JumpForward, JumpDown, ladders ( ledges NOT ).
Use NPCScript::additionalTriggerConditions() to add additional conditions for traversing obstacles ( like is player y position is higher/lower than npc or else).
- started adding npc types.
- added Enemy,Neutral.
- Enemy is using behaviour as before - if player enters GuardZone, he starts attacking.
- Neutral is in CombatIdle state unless attacked - then he switches to Enemy type and starts attacking player.
- For adding neutral npc states/behaviours - use NPCScript::_combat_idle_state - he will do whatever ( like reading book ) unless attacked- - then, like I said he will switch to enenmy type.
- If switched from enemy type to neutral, npc will return to start position into CombatIdle mode - thus resuming whatever he was doing.
- for example of deriving from NPCScript and using _combat_idle_state - look in NPCPatrol or NPCGuard scripts.
- added visibilty detection range and obstruction for npcs. If visibilty set to 90 deg. npc will not detect if player is behind him. Also if npc is blocked by wall - it will not detect player behind.
- added clear() method for scripts which removes all references and deinitializes component.
- added OnDestroy() method that calls clear() method.
- removed standard assets from package ( left what I needed from it )
- added possibility for weapon to collide with enviroment. Added ITEM_COLLIDE_WITH_ENVIROMENT scripting define in player settings. To use collision with enviroment add collider to ImpactCollider field in Weapon component.
- remove ITEM_COLLIDE_WITH_ENVIROMENT define from player defines if you dont wanna use it.
- fixed orient camera rotation errors ( camera now unparents from player upon start )
- change attack_hit_notify method to accept AttackInfo class as single parameter wich you can extend instead of many parameters
- added method NPCScript::destroyNPC which you can call to destroy/delete npc from scene/game.
- added new callbacks on WeaponItem:
OnStartAttack - delegate fires on start of attack,
OnSwing - fires on attack swing ( called in attack hit - fires always ),
OnHit - fires on attack hit ( called in attack hit - fires on attack hit success ),
OnBlock - fires on opponent block
- for instance, you can use those to apply additional ( or replace - like I did with Chainsaw weapon ) sounds, apply particles or else.
- added possibility to not have created ragdoll on npcs for additional performance boost and, upon death, instead ragdoll start, death animation starts.
- added triggers for loading another scene.
Enter name of scene and upon trigger enter - current scene will fade in start loading new scene.
- added system to carry equipment through scenes - collected items droped stay on scene on which is dropped and missing from scene if player is taken from it.