![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Soundman
![]() Join Date: Mar 2016
Posts: 142
Downloads: 24
Uploads: 0
|
![]()
Hi guys,
I need to figure out how to add a timer for a python script. Many of the scripts refer to TimerID_SomeTimeName with a decimal identifier. It looks like timers (which seem to trigger animation callbacks) might be set up via one of the tools, eg Goblin Editor or something but I can't find it. Can somebody help point the way please? |
![]() |
![]() |
![]() |
#2 |
Ace of the deep .
|
![]()
I guess that its not people ignoring the question . Probably no one knows the answer .
|
![]() |
![]() |
![]() |
#3 |
Soundman
![]() Join Date: Mar 2016
Posts: 142
Downloads: 24
Uploads: 0
|
![]()
Thanks Sober.
Ok, so I think the question might be answered a different way; how do people animate items in the menus? eg, stuff moving up/down? That might help me if somebody knows how menu item animation is put together. |
![]() |
![]() |
![]() |
#4 |
Ace of the deep .
|
![]()
Have you used the menu editor ?. I'm not saying I know how to move menu items up/down though .
|
![]() |
![]() |
![]() |
#5 |
Soundman
![]() Join Date: Mar 2016
Posts: 142
Downloads: 24
Uploads: 0
|
![]()
I have been into the menu editor but not being too familiar with it its difficult to know if I'm looking in the right places. I can't find anything in there that describes animation. But for example some of the buttons in the game are animated like the dive ones. It's driving me mad not finding what I'm looking for!!!
|
![]() |
![]() |
![]() |
#6 |
Lieutenant
![]() Join Date: Mar 2010
Location: South Atlantic
Posts: 262
Downloads: 673
Uploads: 2
|
![]()
When I was learning scripting for SH5 I came across two timer implementations, but have never used them.
There's a high precision timer provided by TDW called TDWHPT with methods like Start(), Stop(), Reset() etc. There's no documentation, you'll have to learn how it works from the scripts. Take a look at Page layout.py or Page Default Hud.py (TWOS mod.) This one is used all over the scripts. Code:
clr.AddReference( "TDWHPT" ) from TheDarkWraith.SilentHunter5 import TDWHPT # create the high precision game timer global Pagelayout_HPTimer Pagelayout_HPTimer = TDWHPT( Menu, Game, Pagelayout_GameTimerEvent ) There seems to be a "default" timer as well that uses StartAnimation(), StopAnimationsWithID() and TimerIDs, but I'm not sure how this one works. |
![]() |
![]() |
![]() |
|
|