SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 05-05-10, 08:26 AM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

what's the popup error it keeps giving you?
TheDarkWraith is offline   Reply With Quote
Old 05-05-10, 09:15 AM   #2
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by TheDarkWraith View Post
what's the popup error it keeps giving you?

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???
reaper7 is offline   Reply With Quote
Old 05-05-10, 09:20 AM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

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, ]:
TheDarkWraith is offline   Reply With Quote
Old 05-05-10, 12:53 PM   #4
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by TheDarkWraith View Post
Move this line to InitializeScript from PageActivated:

Pageobsperiscope.AnimationStopped += Pageobsperiscope_AnimationStopped

move it's assocaited -= to unload script

Had tried that from copying the Dafault Hud format:
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:
Originally Posted by TheDarkWraith View Post
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, ]:
Don't know how that comma keeps making it back into my code, could have sworn I deleted it .

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 ) So now I have to redo my work to get back to this point . At least its just stuff in the Menu Editor that needs redoing as Graphics are all duplicated - Phew.
reaper7 is offline   Reply With Quote
Old 05-05-10, 04:37 PM   #5
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default Yes its Working

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)
reaper7 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.