The Drop Collectables When Killed
script lets you configure what is dropped and how far from the enemy it drops. Drops can appear for all players, just for the killer or in more advanced use cases the "owner" or player that spawned the enemy. Our example doesn't use the "owner" type but it is there for advanced users who understand how to use something like that.
Drops can just appear on the ground within a radius of the enemy or they can animate in a curve from the enemy to their final position. Visual effects templates can also be spawned for extra polish.
Let's look at what each property on the script does:
Drop Type
Collectable Drop Data Ids
Drop Position
Drop Radius
Animate Drops
Drop Fx
The comma separated list of ids lets you share drop data among enemies and can help cut down on the total data in your game, though you can also just assign a single drop to each enemy since drops themselves can contain multiple types of collectables.
To edit or add this data just select the "Collectable Drop Database" object and look at the "Collectable Drop Data" scripts on it. The ids in this data are linked to the "Collectable Database" object with "Collectable Data" scripts.
Let's use the first Collectable Drop Data entry as an example. This entry contains the drops for the boss at the end of the level. You can see that the Data Id is "Boss Drop" and that it drops 3 Coins, 1 Potion and 1 Key.
Those Coin, Potion and Key Ids point to Collectable Data entries in the "Collectable Database". Selecting that and inspecting the scripts will show you the data used for those. You can read up on how that data works here: Collectables