![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
10-30-11, 02:14 PM
|
#1 | |
|
Samurai Navy
![]() Join Date: Jun 2009
Location: Germany, 50 Kilometers away from Kiel
Posts: 575
Downloads: 343
Uploads: 0
|
Quote:
|
|
|
|
10-30-11, 03:19 PM
|
#2 | |
|
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
|
Quote:
Here is my code in the Attack Periscope You can see similar code in the stock PageDefaultHud for the contacts in the TAI Map when clicked on causes the camera to point at the contact. sub = PageDefaultHud_TAI_Mapcontrol.SubmarineContact angle = sub.HeadingDEGToContact(PageDefaultHud_TAI_Mapcont rol.LockedOnContact ) - sub.HeadingDEG import game game.Game.SubmarineCommands.RotateActiveCameraToAn gleDEG( angle,0.001 ) Code:
# Globals TrackTarget = False Code:
def InitializeScript(): Pageattackperiscope_LockToggle.Clicked += LockToggle LockToggle( None ) Code:
def Pageattackperiscope_AnimationStopped( animation ): if TrackTarget == True: from Pagenavigationmap import Pagenavigationmap_Mapcontrol sub = Pagenavigationmap_Mapcontrol.SubmarineContact angle = sub.HeadingDEGToContact(Pagenavigationmap_Mapcontrol.LockedOnContact ) - sub.HeadingDEG import game game.Game.SubmarineCommands.RotateActiveCameraToAngleDEG( angle,0.001 ) Code:
def LockToggle( sender ): from Pagenavigationmap import Pagenavigationmap_Mapcontrol global TrackTarget if Pageattackperiscope_LockToggle.IsChecked: TargetLock = Pagenavigationmap_Mapcontrol.LockedOnContact if TargetLock == None: Game.SubmarineCommands.ExecuteCommand( "Lock_target" ) if contact == TargetLock: Pageattackperiscope_LockToggle.SetCheck( False, False ) else: TrackTarget = True else: Game.SubmarineCommands.ExecuteCommand( "Unlock_target" ) TrackTarget = False Code:
def Menu_PageDeactivated( page ): Pageattackperiscope_LockToggle.Clicked -= LockToggle The same can be done at the Obs scope and UZO etc. Hope that Helps Mate |
|
|
|
10-31-11, 06:42 AM
|
#3 |
|
Samurai Navy
![]() Join Date: Jun 2009
Location: Germany, 50 Kilometers away from Kiel
Posts: 575
Downloads: 343
Uploads: 0
|
[QUOTE=reaper7;1777086]Sure no problem DrJones.
Here is my code in the Attack Periscope You can see similar code in the stock PageDefaultHud for the contacts in the TAI Map when clicked on causes the camera to point at the contact. sub = PageDefaultHud_TAI_Mapcontrol.SubmarineContact angle = sub.HeadingDEGToContact(PageDefaultHud_TAI_Mapcont rol.LockedOnContact ) - sub.HeadingDEG import game game.Game.SubmarineCommands.RotateActiveCameraToAn gleDEG( angle,0.001 ) Thank you very much for your help. it is on my to do list.... |
|
|
11-05-11, 07:30 PM
|
#4 |
|
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
|
Got some Pics of the latest updates at last.
Finally pretty much back to where I originally was before losing all my work. Also remade the TDC again, now its closer to the original as I've removed the Fat/lut dials and giving them a new home. ![]() Main Interface ![]() Replica TDC ![]() Replica Fat/Lut Panel (Just need to make 2 Needles for the Top dials.)
|
|
|
11-06-11, 04:31 AM
|
#5 |
|
The Old Man
![]() |
Very nice work as always!
|
|
|
11-06-11, 12:51 PM
|
#6 |
|
Swabbie
![]() Join Date: Aug 2011
Posts: 7
Downloads: 133
Uploads: 0
|
Incredibly cool! Can't wait to try it...
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
