Back to Mod List
 Huddraw_3d Utility
Tools

Huddraw_3d Utility

Creator

Leyok

Version

1.0

Game Type

MOHAA

Reborn Compatible

All

Description

I've made this scripting utility for people who want to show a point relative to an origin/entity on-screen. This is also useful on making objective points. It only works with the reborn patch. ============================================ How to install (you might know it already) : put huddraw_3d.pk3 in your mohaa installation/main. ============================================ Here is the documentation on how it works : ============================================================================================================================================================================= /* * global/huddraw_3d.scr::worldtoscreen : convert a vector (origin) to a screen rectangle * a player must be specified when calling it (like local.player thread global/huddraw_3d.scr::worldtoscreen) * parameters : * local.origin : the vector to convert to a screen rectangle * result : * return an array : [0] is the screenX, [1] is the screenY and [2] specify whether if the origin can be shown or not from the player's view * example : * local.rect = $player thread global/huddraw_3d.scr::worldtoscreen ( 0 0 0 ) * local.sizeX = local.rect[0] * local.sizeY = local.rect[1] * local.shown = local.rect[2] \* ============================================================================================================================================================================= /* * global/huddraw_3d.scr::add3dpoint : show a 3D icon in-game for a player * a player must be specified when calling it (like local.player thread global/huddraw_3d.scr::add3dpoint) * parameters : * local.id : identifier of the huddraw element * local.origin : point origin. If local.entity is specified local.origin will be the vector offset for the point from the specified entity * local.string : like the (not working) print3d, it show a string in this location (but is forced to ignore the distance) * local.font [OPTIONAL] : Font to use if local.string is specified. This parameter will be ignored if local.string is not specified. The default font is "facfont-20". * local.shader : shader to show at the origin * local.ignoredistance : if set to 1, the shader will not be auto-sized from the player relative to the point's and local.sizeX and local.sizeY must be specified * local.sizeX : width size of the shader (default 32) * local.sizeY : height size of the shader (default 32) * local.refreshdelay : a number that specify how much to wait before refreshing. Setting "frame" will refresh each server frame. (default "frame") * local.entity [OPTIONAL] : entity to follow. If this parameter is specified, local.origin will be the vector offset for the point from the specified entity * remarks : * local.string and local.shader mustn't be specified both * local.sizeX and local.sizeY can be specified only if local.ignoredistance isn't set to 0 * example: * $player thread global/huddraw_3d.scr::add3dpoint 200 ( 0 0 0 ) NIL "textures/hud/allies.tga" 1 32 32 "frame" * $player thread global/huddraw_3d.scr::add3dpoint 180 ( 0 0 0 ) "ENTITY#1" NIL 0 NIL NIL "frame" $entity_1 \* ============================================================================================================================================================================= /* * change3dpoint_X : change a 3D point property for a player * * available functions : * * change3dpoint_followent -> params : ( Integer ID, Entity entity ) * change3dpoint_font -> params : ( Integer ID, String font ) * change3dpoint_ignoredistance -> params : ( Integer ID, Boolean ignore_distance ) * change3dpoint_origin -> params : ( Integer ID, Vector origin ) * change3dpoint_refreshdelay -> params : ( Integer ID, Integer refreshdelay ) * change3dpoint_shader -> params : ( Integer ID, String shader ) * change3dpoint_size -> params : ( Integer ID, Integer sizeX, Integer sizeY ) * change3dpoint_string -> params : ( Integer ID, String string ) * * See add3dpoint documentation for more informations on what these functions can do * * returns 1 on success, 0 otherwise \* ============================================================================================================================================================================= /* * change3dpoint_followent * see add3dpoint documentation for more * parameters : * local.id : identifier of the huddraw element * local.entity : entity to follow. If local.entity is NULL/NIL, then it will make the point stop following the entity * example : * $player thread global/huddraw_3d.scr::change3dpoint_followent 180 $entity_2 * $player thread global/huddraw_3d.scr::change3dpoint_followent 180 NIL \* ============================================================================================================================================================================= /* * remove3dpoint : remove a 3D point from a player * parameters : * local.id : 3D point id to remove from the player \*/

Credits

Leyok

Engine & Patch Compatibility

Community-tested verification on official patches & Reborn

0.0
0 reviews

Community Rating & Discussions

Rate this mod and share feedback or installation tips with fellow players.

Your Rating:
Leave a Comment / ReviewLog in to join the discussion
Loading discussions...

Downloads

278

Total Downloads

Date Added

September 30, 2014

Download

Filemoh_huddraw_3d.zip
Size8.56 KB
Download Mod

Mod Information

RebornAll