PDA

View Full Version : [REQ] 3d Help to make dials clickable


McBob
03-21-10, 10:05 AM
I have spent some time trying to make the 3d Dials clickable to set speed etc using the Goblin editor that come with SH5 and scripting

I manged to change the switches at the radar station to control the speed and tried to then apply this to the other guages without success. At first I thought this was because the radar switches are part of a station. However in the end I decided that it was because they have an attribute called 'MouseMask'

Using granny viewer this MouseMask appears to be a 'virtual' mesh that covers the switch. By virtual I mean that it is not desplayed on the screen and only used to sense when the mouse pointer is other the target.

I searched the other rooms and found that the two compressed air guages in the control room also have this mousemask attribute, but no scripting to do anything when clicked. The mouse mask is there so that some text comes up when the mouse goes other them explaining what compressed air is used for in the sub. I manged to successfully modify these dials in Goblin and the script files so that clicking would activate a command such as crash dive or ahead full.

I therefore believe that if someone could alter the 3d models so that mousemasks are on all the dials (or other items) we want to be clickable then this should be possible. A difficulty will be that I do not know how to detect where the mouse pointer is in relation to the dial when clicked. i.e. with the speed dial how do you know whether ahead full has been clicked or all stop. I believe simple work around would be to split the dial into segments each with there own name and corresponding mouse mask.

Has anyone had any luck editing the GR2 files? If so would you be kind enough to do as I suggest above with one of the telegraphs in the conning tower and I will then see if I can create the required code.