Moves the origin point of drawing to or by the specified amount.
To = Sets to the specified amount.
By = Adds the specified amount to the existing amount.
g.translate([NUMBER], [NUMBER]);
g.moveTo([NUMBER], [NUMBER]);
By default, when drawing on actors, the coordinates are relative to the actor. This blocks switches the origin point of drawing to screen coordinates. This allows you to draw HUD's and other graphics that are anchored to the screen (and are unaffected by the camera).
g.translateToScreen();
Moves the origin point of the drawing to match the position of the specified actor.
g.translateToActor([ACTOR]);
Set the layer for drawing.
Script.setDrawingLayer(engine.getLayerById([INT]));
Script.setDrawingLayer(engine.getLayerByName([TEXT]));
Set the layer for drawing to the HUD layer, above all other layers.
Script.setDrawingLayerToSceneLayer();
Set the layer for drawing to the layer with the specified actor.
Script.setDrawingLayerToActorLayer([ACTOR]);