Really!!!? TEXT* pointers were added to C-Script???! That's great news.
Code:
ptr_for_handle(varH).pos_x = value;  //???



Quote:

but it should move the text to the model's position.



WTF. I noticed some completely surprising, absolutely unexpected, compile-type errors when I tried to apply TEXT specific thingies to a var dojigger. Please tell me what I did wrong, so that I might neutralize the errors.

edit: Problem solved. I wasn't paying attention and didn' t realize that TEXT IS_A PANEL.
Code:

PANEL* my_txt1;
my_txt1 = txt_create(1, 1);
my_txt1.pos_x = 1;
my_txt1.pos_y = 1;
txt_load(my_txt1, "uiSave0.txt");
my_txt1.visible = on;
//perfect!!! C-Script ROX your baby booties off




I've written a C++ plugin (for use with C-Script) which allows the dynamic creation of some 3DGS UI elements.
The plugin is a work in progress but some components are functional.
->dynamic creation, rough manipulation and simple management of panels, buttons (with or without 3DGS TEXT elements), labels, rudimentary checkboxes, rudimentary text fields, text numeric input spinners...(all of which require some C-Script interaction)
->small portions of dynamic editor test sample with persistence (open / save functionality)
I believe currently, the plugin could be used to create, a dynamic number of panels with optional images, an optional runtime selectable number of text strings moved with those panels, an optional dynamic number of buttons, optional TEXT elements moved with those buttons on the panels, an optional dynamic number of numeric input spinners including text... Such components could be tied to and placed over entities without a whole lot of effort...
Actually such a plugin probably doesn't represent an optimal solution HERE.

On this page a file named _0c.wdl is listed.
In that script file, there are functions named drawxxx, which utilize draw_text functionality.
For example, if I would like to display the values of two skills and the position for an entity over that entity using three lines of text, I might write:
Code:

drawVar0("skill1 = ", my.skill1, vector(my.x, my.y, my.z + my.max_z), -2); //line -2
drawVar0("skill2 = ", my.skill2, vector(my.x, my.y, my.z + my.max_z), -1); //line -1
drawVec0("my.x = ", my.x, vector(my.x, my.y, my.z + my.max_z) 0); //line 0


Also there are two drawStrX functions.

Last edited by testDummy; 05/11/07 09:29.