![]() |
A carried object is a map entity that the hero is lifting, carrying or throwing.
A carried object is created automatically by the engine when the hero lifts a map entity. Map entities that can be lifted include destructible objects and bombs. The carried object takes the sprite and the features of the lifted entity it is created from.
The hero can then walk with his carried object and throw it. He can even go to another map: the carried object is preserved.
Two sprites for a carried object are automatically created by the engine. You can access them like for any other entity, specifying their name in entity:get_sprite([name]).
"main"
: Main sprite representing the carried object. Its animation set is the one of the original entity he was created from (like a destructible object), with the animation "stopped"
or "walking"
depending on the hero state, and the same direction as the hero. This is the default sprite in entity:get_sprite([name])."shadow"
: Shadow displayed under the carried object when thrown. Its animation set is "entities/shadow"
, with the animation name "big"
.Carried objects are particular map entities. Therefore, they inherit all methods from the type map entity.
See Methods of all entity types to know these methods.
None.
Events are callback methods automatically called by the engine if you define them.
Carried objects are particular map entities. Therefore, they inherit all events from the type map entity.
See Events of all entity types to know these events.
None.