natives.DRAW CORONA: Difference between revisions

Add ScriptItem documentation from GTA VC SCM decompile
(Created page with "{{ScriptItem |endpoint = client |games = vc |type = function |name = natives.DRAW_CORONA |parameters = Vec3 position, float radius, int type, int flare, int r, int g, int a |parameter1 = Vec3 position World coordinates where the corona is drawn (x, y, z) |parameter2 = float radius Corona radius/size (1.0 , 1.5 , 2.0) |parameter3 = int type Corona style (available 0–8) |parameter4 = int flare Lensflare option (0 = none, 1 = yellow, 2 = white) |parameter5 = int r Red co...")
 
(Add ScriptItem documentation from GTA VC SCM decompile)
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = client
|side = client
|games = vc
|games = vc
|type = function
|type = function
|name = natives.DRAW_CORONA
|name = natives.DRAW_CORONA
|parameters = Vec3 position, float radius, int type, int flare, int r, int g, int a
|arg1 = Vec3 position World coordinates (x, y, z).
|parameter1 = Vec3 position World coordinates where the corona is drawn (x, y, z)
|arg2 = float entity Entity handle.
|parameter2 = float radius Corona radius/size (1.0 , 1.5 , 2.0)
|arg3 = int param1 Integer value.
|parameter3 = int type Corona style (available 0–8)
|arg4 = int param2 Integer value.
|parameter4 = int flare Lensflare option (0 = none, 1 = yellow, 2 = white)
|arg5 = int param3 Integer value.
|parameter5 = int r Red component (0–255)
|arg6 = int param4 Integer value.
|parameter6 = int g Green component (0–255)
|arg7 = int flag Flag value (0 or 1).
|parameter7 = int a Alpha (0–255; 0 invisible, 255 fully visible)
|desc = draws corona
|usage = Draw a corona (light halo) at a specific world position in Vice City, with optional lensflare
|notes = Type selects the corona style (0–8). Flare is independent and supports three values: none, yellow, white. Color is defined by R and G only in this implementation; use alpha to control opacity.
|return1 = void
|return1 = void
|returnFail1 = void
|exampleJS = addEventHandler("OnDrawnHUD", function() {
    // Corona: position, radius, type, flare, R, G, A (7 params)
    natives.DRAW_CORONA(new Vec3(-592.0, 670.0, 11.0), 2.0, 2, 0, 0, 190, 100);  // type=2, flare=none, cyan-ish via R/G, semi-transparent
    natives.DRAW_CORONA(new Vec3(-600.0, 675.0, 11.0), 1.5, 3, 1, 255, 255, 200); // type=3, flare=yellow
    natives.DRAW_CORONA(new Vec3(-605.0, 665.0, 11.0), 1.0, 5, 2, 255, 128, 255); // type=5, flare=white
});
}}
}}
2,446

edits