SeekEntity /Scene and entities

ETHEntity@ SeekEntity(string entityName)

Returns a handle to the entity whose name equals entityName. Returns null if it couldn't be found.

AddEntity("bowser.ent", pos);
ETHEntity@ bowser = SeekEntity("bowser.ent");
AddEntity("level_boss.ent", pos, "bowser");
ETHEntity@ bowser = SeekEntity("bowser");

If there are multiple entities with matching names, the entity handle returned by SeekEntity will point to the first one it could find.

When the entity found is temporary, this function returns null.

Warning! Depending on how many entities the scene has, this function may become expensive to the CPU. Using this function too many times inside the game loop must be avoided. Consider retrieving those entities before the game loop starts and store them in an accessible place.