Item Pickup
Remember that Items that can be "lying around" in the game world must be Units. Therefore, the user has to create a prefab for the item.
If an Item should be "pickup-able" its prefab must have the Pickup
Component.
The picking Unit’s alignment towards the Unit that should be picked up, must not be hostile.
Item Powerup
If an Item’s prefab has the Powerup
Component instead of Pickup
, the picking unit will immediately use the item when walking over it.
This also means that the powerup item must be an ItemInstant. An ItemBase is not "enough" as this class does not define an effect.
when a Powerup is walked across, only an "ItemUsed" Actor Message will be emitted. |