How to define loot to entity?
This defines a list of entity models (props) that players can interact with for looting. Each model is mapped to a loot type, determining the kind of lootable rewards it provides.
Purpose:
Specifies which world objects can be looted.
Associates each object with a defined loot type in the configuration.
Example Configuration:
Explanation:
Keys: The model names of objects or entities in the game (e.g.,
prop_box_wood01a
,prop_rub_carwreck_3
).Values: The loot type associated with the model (e.g.,
prop_loot
,car_loot
).
Use Case:
A wooden box (
prop_box_wood08a
) is lootable and uses theprop_loot
rewards table.A car wreck (
prop_rub_carwreck_3
) is lootable and uses thecar_loot
rewards table.
How It Works: When a player approaches an entity, the script checks if its model exists in the LootAbles
list. If it does, the script allows interaction and determines the loot type.
Last updated