improve docs and remove irrelevant example
This commit is contained in:
@@ -78,14 +78,7 @@ end)
|
|||||||
## How do i give a character a certain affliction
|
## How do i give a character a certain affliction
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local burnPrefab
|
local burnPrefab = AfflictionPrefab.Prefabs["burn"]
|
||||||
|
|
||||||
for k, v in pairs(AfflictionPrefab.ListArray) do
|
|
||||||
if v.Identifier == "burn" then
|
|
||||||
burnPrefab = v
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local char = Character.CharacterList[1]
|
local char = Character.CharacterList[1]
|
||||||
local limb = char.AnimController.MainLimb
|
local limb = char.AnimController.MainLimb
|
||||||
|
|||||||
@@ -10,22 +10,6 @@ Hook.Add('chatMessage', 'suicide_mod', function(msg, client)
|
|||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
|
|
||||||
```lua
|
|
||||||
local characters = Character.CharacterList
|
|
||||||
local biteWoundsPrefab
|
|
||||||
|
|
||||||
for k, v in pairs(AfflictionPrefab.ListArray) do
|
|
||||||
if v.name == "Bite wounds" then
|
|
||||||
biteWoundsPrefab = v
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
for k, v in pairs(characters) do
|
|
||||||
v.CharacterHealth.ApplyAffliction(v.AnimController.MainLimb, biteWoundsPrefab.Instantiate(100));
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
Hook.Add("itemApplyTreatment", "testItemApplyTreatment", function (item, user, character, targetlimb)
|
Hook.Add("itemApplyTreatment", "testItemApplyTreatment", function (item, user, character, targetlimb)
|
||||||
if item.name == "Bandage" then
|
if item.name == "Bandage" then
|
||||||
|
|||||||
Reference in New Issue
Block a user