![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Black Magic
![]() |
![]()
what's the popup error it keeps giving you?
|
![]() |
![]() |
![]() |
#2 |
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
|
![]() The Popup error was the one I created using ScriptManagerManaged.ShowPythonError for feedback. I just did that to prove if the Default.hud script was going into the def Pageobsperiscope_AnimationStopped( Animation ): part of the script, which it does in an endless loop (Good). Whereas in my script above it never goes into the def Pageobsperiscope_AnimationStopped( Animation ): part of the script hence the ScriptManagerManaged popup I placed in it does not show up, nor does the Item I wasnt to control work. (The script appears to only cycle once - although the [ Toggle( None ) ] functions in the InilalizeScript (): work ok when there corresponding button is clicked. So the script works perfectly when the game runs for first time, but after that the timer part does not appear to do anything??? |
![]() |
![]() |
![]() |
#3 |
Black Magic
![]() |
![]()
Move this line to InitializeScript from PageActivated:
Pageobsperiscope.AnimationStopped += Pageobsperiscope_AnimationStopped move it's assocaited -= to unload script add this to the end of InitializeScript: Menu_PageActivated( Pageobsperiscope ) remove pass from startgame and unloadscript remove stray comma after 5: if d.Hour in [ 22,23,0,1,2,3,4,5, ]: |
![]() |
![]() |
![]() |
#4 | ||
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
|
![]() Quote:
But whats follows I didn't see in that script, looks Interesting. That looks like it will kickstart it into doing the Animationstop part ![]() Quote:
![]() Will Test this soon, Did something silly - disabled My WIP UI Mod from JGSME to try something without backing up what I had done for the last few days. (The second I clicked on remove it dawned on me ![]() ![]() |
||
![]() |
![]() |
![]() |
#5 |
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
|
![]()
Thank you DW that did the trick perfectly. Script is now running the Timer and accessing the AnimationStopped function nicely.
Just had to tweak my script a bit and everyting is now workin as hoped for. ![]() Here's some pics of how its getting around the stock bug of the Markings group not working ingame for the Obs Periscope (Attack and UZO work fine in stock). Here's my new Obs Graticule and obs RAOBF in action. Day-time: ![]() Night-time: ![]() So now when the time is between 10Pm and 6am the Graticules are Flourecent Green (Glow in the dark style) and during the rest of the Day the revert to Jet black not transparent grey as in stock. ![]() Also redone the compass to have a more imbedded look rather than floating over the scope: Just need to make this hidden when RAOBF is activated. ![]() Also have the AttackScope done as well. This was a hell of a lot easier as the bug did not apply to them so they don't require the same means of script to change between night and day. (The attack scope will change just as the stock ones do) |
![]() |
![]() |
![]() |
|
|