Scripting Entity Functions are called on the Entity object. For example
Entity ent=getFigure(createLocation(3,3)); ent.remove();
List of functions: