![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Grey Wolf
![]() Join Date: Jan 2011
Location: greece
Posts: 827
Downloads: 505
Uploads: 0
|
![]()
well i guess i have to wait until a playble battleship builds.....since i cant do it because no one helps:/
|
![]() |
![]() |
![]() |
#2 |
Sparky
![]() Join Date: Apr 2010
Location: Germany
Posts: 157
Downloads: 270
Uploads: 2
|
Problem triggering action with new button!
Hello! I hope it's the right place to ask, but I've got a problem triggering an action from a new checkbox. Maybe someone can help? Here the situation: To toggle SpeechRecognition on/off I created a new checkbox with the MenuEditor. Located above the PageDefaultHud_Feedback_BottomBar_ToggleAdvancedCk (NewUI) It's showing ingame and I can click it. The coressponding Lines in Page Default Hud.ini look like this: Code:
[G0A I278] Name=ToggleSpeechRecCk Type=1033;Check box ItemID=0xA1E0001 ParentID=0xA1E0000 Pos=253,-4,18,20 Zone= 255 46 18 20 0 1 0xA1E0000 0.952727 -0.29 0xA1E0001 -0.5 0.5 0 0 Materials=8 Display=2;Linear Mat 0=data/menu/gui/layout/hud3.dds Crop 0=0.178711,0.105469,0.0175781,0.0195313 Mat 1=data/menu/gui/layout/hud3.dds Crop 1=0.178711,0.128906,0.0175781,0.0195313 Mat 2=data/menu/gui/layout/hud3.dds Crop 2=0.178711,0.105469,0.0175781,0.0195313 Mat 3=data/menu/gui/layout/hud3.dds Crop 3=0.178711,0.128906,0.0175781,0.0195313 Mat 4=data/menu/gui/layout/hud3.dds Crop 4=0.178711,0.105469,0.0175781,0.0195313 Mat 5=data/menu/gui/layout/hud3.dds Crop 5=0.178711,0.128906,0.0175781,0.0195313 Mat 6=data/menu/gui/layout/hud3.dds Crop 6=0.178711,0.105469,0.0175781,0.0195313 Mat 7=data/menu/gui/layout/hud3.dds Crop 7=0.178711,0.128906,0.0175781,0.0195313 MatFlags=0x9 TexFmt=0x0 Font=21 Text=0 TextPosFlags=0x2 TextOffsetY=8,8,8,8 TextFlags=0x0 CheckBoxWidth=0 StatesColors=0xCDBEB4FF, 0xCDBEB4FF, 0xCDBEB4FF, 0xCDBEB4FF ![]() Code:
from SpeechRecognition import ToggleSpeechRecognitionOnOff ... def PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk_Clicked(): ToggleSpeechRecognitionOnOff() ... def InitializeScript(): .... PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk.Clicked += PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk_Clicked ... def UnloadScript(): ... PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk.Clicked -= PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk_Clicked So what went wrong importing Speech Recognition.py??? Called from Speech Recognition.py the command is working like expected! What's the minimum of code needed for a new button like this? What did I miss? What would be needed if I wan't to add a new group? Thanks in advance! Greets MiTon Last edited by MiTon; 03-25-11 at 05:08 AM. |
![]() |
![]() |
![]() |
#3 |
Black Magic
![]() |
![]()
If SpeechRecognition hasn't been 'opened' yet then it isn't initialized/valid. You must initialize it first either by opening it or using the MakeSureIsLoaded function of the ScriptManager.
Last edited by TheDarkWraith; 03-25-11 at 09:13 AM. |
![]() |
![]() |
![]() |
#4 |
Nub
![]() Join Date: Jul 2008
Posts: 2
Downloads: 231
Uploads: 0
|
![]()
cool
|
![]() |
![]() |
![]() |
#5 |
Swabbie
![]() Join Date: Mar 2015
Location: Paris
Posts: 13
Downloads: 32
Uploads: 0
|
![]()
I am not able to see images (also with right mouse button).
is it my problem or thread pb? thx |
![]() |
![]() |
![]() |
#6 |
Watch
![]() Join Date: Jan 2017
Posts: 20
Downloads: 33
Uploads: 0
|
![]()
Hello! I delve into the Goblin editor. I am trying to make changes to the object, for example in the Deck Gun. I can not understand how all the same to edit objects (Deck gun) Goblin in the editor? Like the editor works for me. I configure it as mentioned in earlier posts. Loading the main image - Submarin.GR2, then merge, - further file from Object- Gun- ... sim. Well, and then how ...? Gun rotates all. Further, it is impossible to change anything in detail. It may be necessary detail for its changes in export Max3D? Thank you!
|
![]() |
![]() |
![]() |
#7 |
Old enough to know better
|
![]()
Reported as spam. ^
__________________
“Two possibilities exist: either we are alone in the Universe or we are not. Both are equally terrifying.” ― Arthur C. Clarke ![]() |
![]() |
![]() |
![]() |
#8 |
Chief of the Boat
|
![]() |
![]() |
![]() |
![]() |
#9 |
Gefallen Engel U-666
|
![]()
^
![]()
__________________
"Only two things are infinite; The Universe and human squirrelyness?!! |
![]() |
![]() |
![]() |
#10 |
Commodore
![]() Join Date: Dec 2009
Location: My House
Posts: 608
Downloads: 161
Uploads: 0
|
![]()
oh my god, this is awesome!!!!!
I never knew how to use the mission editor!!!!!!!!!!!! |
![]() |
![]() |
![]() |
#11 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Some new Source Code for NWN2 was released yesterday.
It includes Source Code concerning GR2 files. Incase your nterested here's the link. http://nwn2forums.bioware.com/forums...forum=119&sp=0 Also. There is an exporter for EVE that exports to obj file format. On testing it only the first mesh is exported. However it does come with the Source Code. Here's the link http://dl.eve-files.com/media/0801/evegr2toobj.2.zip You may need to replace the older granny2.dll with the one in the SH5 folder. Or error messages about wrong version popup. Last edited by Madox58; 03-21-10 at 04:49 PM. |
![]() |
![]() |
#12 |
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
|
![]()
Ok, I have been trying to create a new Page into the editor with not much luck, and need some advice.
I have created a Copy basically of the TDC page and Called it Page TDC2 in the editor as a test. This creates the relevant ini page in the Pages Folder (Page TDC2.ini). Ok. I then Create a new script called Page TDC2.py And edit it like the following : (My tabs are not showing up in the scripts when I paste them into forum) def InitializeScript(): pass def StartGame(): pass def EndGame(): pass def UnloadScript(): pass Now as I want the Periscope to bring this page up in the game I edit the Page attack periscope.py file like this: #Page attack periscope.py from menu import * def InitializeScript(): Menu.PageActivated += Menu_PageActivated Menu.PageDeactivated += Menu_PageDeactivated def StartGame(): pass def Menu_PageActivated( page ): if page == Pageattackperiscope: from PageTDC2 import PageTDC2 PageTDC2.Visible = True def Menu_PageDeactivated( page ): if page == Pageattackperiscope: from PageTDC2 import PageTDC2 PageTDC2.Visible = False def UnloadScript(): Menu.PageActivated -= Menu_PageActivated Menu.PageDeactivated -= Menu_PageDeactivated def EndGame(): pass These are placed into the correct folders and the game is launched. Game loads ok, but when I activate the periscope the game freezes with the following script error. ![]() Can anyone tell me what I'm doing wrong. I've no scripting experience but this appears to be the method as shown earlier in this thread. The no module named TDC2 is baffling me, how do you create a module? ![]() |
![]() |
![]() |
![]() |
#13 |
Watch
![]() Join Date: Feb 2010
Location: Barcelona, SPAIN
Posts: 27
Downloads: 38
Uploads: 0
|
![]()
Please, I've been sailing a few days on SH5 but I haven't heard any song from the radio because I don't know how it works! Please, let me know what button I must press.
Thank you. |
![]() |
![]() |
![]() |
#14 | |
Black Magic
![]() |
![]() Quote:
Last edited by TheDarkWraith; 03-21-10 at 07:07 PM. |
|
![]() |
![]() |
![]() |
#15 |
Commodore
![]() |
![]()
Hey DarkWraith, given what you've seen so far, what do you think the prospect of passing sim data to the AI scripts is? The menu stuff seemingly has all the depth, course, etc, info. There are python files that look to be an interface to the AI scripting in scripts folder. If that were possible, many cool things could be done.
__________________
- heretic I enjoy drinking beer. MightyFine Crew Mod 1.2.1 - Updated 22 March MightyFine Less Annoying Footsteps Crew AI Scripting Information |
![]() |
![]() |
![]() |
|
|