guiplayerpreview
The first line below is from the menu.cfg, and the the second is the C++ . I have spaced the script out.
- {l Code}: {l Select All Code}
guiplayerpreview $modlval $colrval $teamval $weapval [cleargui 1] 7.5 1
guiplayerpreview(int *model, int *color, int *team, int *weap, char *action, float *scale, int *overlaid, char *altact)
The first 4 of these seem to be straight forward integer values setting various parameters.
char *action - this is what happens when you click on the model, in this case clear the gui
int *overlaid - border ie 0 = border, 1 = no border
char *altact - I am guessing it works the same as action, but I don't know what triggers it.
float *scale - value scales the size of the box and not the model within box. Some way to scale the model would be useful. There does not appear to be a way to turn the spinning off.
guimodelpreview
The second is much more interesting as it allows you to load any model. Again the first line is the script, and the second is the C++ it calls. This dispalys the tank npc in MekArcade.
- {l Code}: {l Select All Code}
guimodelpreview actors/tank forward [cleargui 1] 7.5 1
guimodelpreview(char *model, char *animspec, char *action, float *scale, int *overlaid, char *altact)
Most of these parameters are the same as guiplayerpreview, with the following exceptions:
char *model - model name eg actors/grunt
char *animspec - one of the standard animation names
Again, some way to scale the model would be useful. There does not appear to be a way to turn the spinning off, which in this case limits the usefulness a bit, indeed if you could turn off the spinning potentially use if for cut scenes (gasps of horror) or facial close ups for RPGs, or a few other things.....
Att. is a small script that displays the grunt and a few animations. Copy preview.cfg in to your data folder then type at the console:
- {l Code}: {l Select All Code}
exec preview.cfg; showgui grunt
Enjoy.