Each entity can have slots which are used to hold different resources available in CryENGINE.
The following table list all the different resources which can be allocated in a slot along with the ScriptBind function which allocates it.
CryENGINE Resource | Function |
---|---|
static geometry | LoadObject() or LoadSubObject() |
animated character | LoadCharacter() |
particle emitter | LoadParticleEffect() |
light | LoadLight() |
cloud | LoadCloud() |
fog | LoadFogVolume() |
volume | LoadVolumeObject() |
Each one of these resource may be moved, rotated or scaled related to the entity itself.
It's possible to add parenting link between the slots, making it possible to have related positions.
It is possible to determine if a specified slot is allocated by calling !IsSlotValid().
Additionally, it's possible either to free one slot by calling !FreeSlot() or to free all allocated slot within the entity by calling !FreeAllSlots().
local pos={x=0,y=0,z=0};
self:LoadObject(0,props.fileModel);
self:SetSlotPos(0,pos);
self:SetCurrentSlot(0);