guiplayerpreview and guimodelpreview

guiplayerpreview and guimodelpreview

Postby cdxbow » 18 Nov 2012, 11:57

I'm not sure when these two became available for scripting, guiplayerpreview is used to display the player models in the RE profile gui, and the second, guimodelpreview can display any model. I've had a little play, has anyone else?

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.
Attachments
preview.cfg
(897 Bytes) Downloaded 391 times
User avatar
cdxbow
 
Posts: 317
Joined: 21 Mar 2011, 23:36
Location: Melbourne, Oz

Re: guiplayerpreview and guimodelpreview

Postby Xaran » 24 Dec 2012, 18:50

for preview.cfg I get the "unknown commnand" error for "guimodelpreview" command
User avatar
Xaran
 
Posts: 23
Joined: 06 Oct 2012, 23:50

Re: guiplayerpreview and guimodelpreview

Postby cdxbow » 24 Dec 2012, 23:06

I will check out guimodelpreview in a clean RE install after the Turkey. Merry Xmas to all, by the way.
User avatar
cdxbow
 
Posts: 317
Joined: 21 Mar 2011, 23:36
Location: Melbourne, Oz

Re: guiplayerpreview and guimodelpreview

Postby qreeves » 24 Dec 2012, 23:54

"guimodelpreview" wasn't added until after the release, it will be available in the next version.
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: guiplayerpreview and guimodelpreview

Postby Xaran » 25 Dec 2012, 01:01

So your saying that for now Id need the SVN version for it to work?

P.S. congrats on becoming a dad :cool:
User avatar
Xaran
 
Posts: 23
Joined: 06 Oct 2012, 23:50

Re: guiplayerpreview and guimodelpreview

Postby qreeves » 25 Dec 2012, 01:34

Yeah, basically. Sorry, should be done some time early next year.
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Who is online

Users browsing this forum: No registered users and 1 guest