add LimbType, fix broken links in docs and improve docs in general

This commit is contained in:
Evil Factory
2022-01-29 21:00:22 -03:00
parent aec4d5482e
commit 28b08becd1
12 changed files with 1082 additions and 3 deletions
+37
View File
@@ -74,3 +74,40 @@ Entity.Spawner.AddToSpawnQueue(prefab, firstPlayerCharacter.Inventory, nil, nil,
print(item.Name .. " Has been spawned.")
end)
```
## How do i give a character a certain affliction
```lua
local burnPrefab
for k, v in pairs(AfflictionPrefab.ListArray) do
if v.Identifier == "burn" then
burnPrefab = v
break
end
end
local char = Character.CharacterList[1]
local limb = char.AnimController.MainLimb
-- or char.AnimController.Limbs[1]
char.CharacterHealth.ApplyAffliction(limb, burnPrefab.Instantiate(100))
```
## How do i get the amount of a affliction that a character has?
```lua
local char = Character.CharacterList[1]
print(char.CharacterHealth.GetAffliction("burn"))
-- or
print(char.CharacterHealth.GetAffliction("burn", char.AnimController.Limbs[1]))
```
## How do i send a private chat message?
```lua
local chatMessage = ChatMessage.Create("Sender name", "text here", ChatMessageType.MessageBox, nil, nil)
Game.SendDirectChatMessage(chatMessage, ChatMessageType.MessageBox)
```