Player Character

The Player Character is the main component of Easy Game Pack.
The Player directly controls the in-game menu, the in-game HUD and the inventory UI.
 
The Player can:
  • Interact with the environment by pressing switches, opening doors, etc..
  • Take, inspect and store objects like documents, items, weapons, etc...
  • Execute all typical movements like walk, run, jump, crouch, swim, drive, etc..
  • Use weapons and objects stored into the inventory
 

Placing player into the scene (old method)
 
Starting from 2023.1 version there are different variants of Player and UI prefabs, one for every Game Template.
 
So, if you want to insert player into a newly created scene you have to go to EasyGamePack/Templates project folder:
Then, click on the folder relative to the game template you want to use.
 
Every folder contains 2 prefabs, one for the player and one for the UI.
You have to insert all two of them into the scene.
 
To insert player simply drag and drop player prefab into the scene:
 
To Insert the UI click right mouse button on the UI prefab and choose "Insert Prefab":
This is necessary because the UI prefab contains a huge number of elements so the system takes a lot of time to load all of them and the drag 'n' drop operation, even if possible, could be difficult and frustrating to perform.
 
See Game Templates for more info about how to insert player into a scene.
 

Placing player into the scene using PlayerStart (new method)
 

Handling weapons and items
As said Player character has an inventory that he can manage for storing and using items and weapons.
Either items and weapons can be also equiped by the player.
 
This means that the player can have a number of item and weapon slots on the HUD, these slots can be filled (equiped) with items and weapons stored into the inventory and then, in subsequent moments, they can be selected and used without opening the inventory. We refer to the equiped items and weaopns as, respectively, handItems and handWeapons.
 
6.3.1. Player Character
1

Hand items slots

1. Hand items slots
<TODO>: Insert description text here...
2

Hand weapons slots

2. Hand weapons slots
<TODO>: Insert description text here...
When player pick up a weapon it is automatically put on hand slots, if hand slots are all full the player checks for space inside the inventory (i.e. if there are free weapon slots into the inventory), if he find a slot in the inventory he put the currently selected hand weapon into the inventory and put into the hand slot the new picked weapon.
 
On the contrary,
When player pick up an item it is automatically put into the inventory. Player checks for an empty item slot and, in case inventory is completely full the item is equiped, i.e. it is put on hand slot.
 

Player parameters
Following are the parameters specific for player character class, in can find them into the playerCharacter section of the player character class parameters:
There are other specific parameters about input commands that will be covered in Commands paragraph, and other ones about sounds that will be explained in Sounds.
6.3.1. Player Character
1

Camera

1. Camera
<TODO>: Insert description text here...
2

Max Num Slots

2. Max Num Slots
<TODO>: Insert description text here...
3

Max num weapons

3. Max num weapons
<TODO>: Insert description text here...
4

Max num Hand weapons

4. Max num Hand weapons
<TODO>: Insert description text here...
5

Max num Hand items

5. Max num Hand items
<TODO>: Insert description text here...
6

Max num Docs

6. Max num Docs
<TODO>: Insert description text here...
7

Max num Missions

7. Max num Missions
<TODO>: Insert description text here...
8

Scan distance

8. Scan distance
<TODO>: Insert description text here...
9

Max health

9. Max health
<TODO>: Insert description text here...
10

Outline Low Heatlh

10. Outline Low Heatlh
<TODO>: Insert description text here...
11

Max armor

11. Max armor
<TODO>: Insert description text here...
12

Lamp

12. Lamp
<TODO>: Insert description text here...
13

Battery Duration

13. Battery Duration
<TODO>: Insert description text here...
14

Battery discharge at start

14. Battery discharge at start
<TODO>: Insert description text here...
15

Lamp power

15. Lamp power
<TODO>: Insert description text here...
16

Inventory pause

16. Inventory pause
<TODO>: Insert description text here...
17

Start weapon

17. Start weapon
<TODO>: Insert description text here...
18

GUI

18. GUI
<TODO>: Insert description text here...
19

Action by range

19. Action by range
<TODO>: Insert description text here...
20

Action range

20. Action range
<TODO>: Insert description text here...
21

Auto action mask

21. Auto action mask
<TODO>: Insert description text here...
22

Start mission

22. Start mission
<TODO>: Insert description text here...
23

Hit event

23. Hit event
<TODO>: Insert description text here...
24

Hitmask

24. Hitmask
<TODO>: Insert description text here...
25

Compact Inventory

25. Compact Inventory
<TODO>: Insert description text here...
26

Low health

26. Low health
<TODO>: Insert description text here...
27

Auto recovery

27. Auto recovery
<TODO>: Insert description text here...
28

Auto recovery speed

28. Auto recovery speed
<TODO>: Insert description text here...
29

Low Health texture

29. Low Health texture
<TODO>: Insert description text here...
30

Low Health normal

30. Low Health normal
<TODO>: Insert description text here...
31

Max scan distance

31. Max scan distance
<TODO>: Insert description text here...
32

Dynamic cross

32. Dynamic cross
<TODO>: Insert description text here...
33

Auto slot count

33. Auto slot count
<TODO>: Insert description text here...
34

Start Items

34. Start Items
<TODO>: Insert description text here...
35

Max num map blocks

35. Max num map blocks
<TODO>: Insert description text here...
36

Auto use items

36. Auto use items
<TODO>: Insert description text here...
37

Max bullet time

37. Max bullet time
<TODO>: Insert description text here...
38

Bullet time scale

38. Bullet time scale
<TODO>: Insert description text here...
39

Bullet time recovery speed

39. Bullet time recovery speed
<TODO>: Insert description text here...
40

Outline selections

40. Outline selections
<TODO>: Insert description text here...