Calling Menus Ingame -1 reply

Please wait...

M.Eales

227272-Epic Userid

50 XP

26th April 2010

0 Uploads

140 Posts

0 Threads

#1 7 years ago

I just made a world map menu, but I can't find any Entities that will call the menu in GTK 1.5, I've thought about maybe having a trigger_multiple run a script, BUT I'm unsure of how to call the menu from a script... :)

Any help will be appreciated.

Thanks M.Eales




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#2 7 years ago

I've done this a few times myself. You do need a script, one that has the command SET_MENU_SCREEN. But before you make the script, open up behaved.bhc in notepad (it should be in the same folder as the shortcut to behaved), hit ctrl + f and search for MENUSCREENS. Then add the name of your menu to the list and save it. That way, when you use the SET_MENU_SCREEN command in your script, your menu will be available as one of the options.

Of course if you just replaced one of the original menus, you don't have to edit the .bhc file. It should already be an option.

Just out of curiosity, is this menu to be used in some sort of puzzle? Like the menu puzzles seen so frequently in KOTOR and KOTOR II?




M.Eales

227272-Epic Userid

50 XP

26th April 2010

0 Uploads

140 Posts

0 Threads

#3 7 years ago

I'll try it soon, The menu is going to be a map, that you can access at certain areas to travel to other towns, points of interest etc. It's basically a modified ingameTier1 menu :)

Thanks for the help :)




M.Eales

227272-Epic Userid

50 XP

26th April 2010

0 Uploads

140 Posts

0 Threads

#4 7 years ago

The script works, but for some reason the menu doesnt show... :( I tried triggering from main.menu and its still doesn't work :(

This is what it looks like.

Spoiler: Show

//------------------------------------------------------------------------------------------------ // World Map Menu // // Select Locations. // //------------------------------------------------------------------------------------------------ { menuDef { name "mapMenu" fullScreen 1 rect 0 0 640 480 visible 1 focusColor 1 1 1 1 descX 200 descY 444 descScale 1 descColor 1 .682 0 .8 descAlignment ITEM_ALIGN_CENTER disablecolor .5 .5 .5 1 fadeClamp 1.0

// sets the fadeup alpha fadeCycle 25

// how often fade happens in milliseconds fadeAmount 0.05

// amount to adjust alpha per cycle onOpen { show location_button stopVoice } onESC { }

//---------------------------------------------------------------------------------------------- // MENU BACKGROUND //---------------------------------------------------------------------------------------------- itemDef { name background group none style WINDOW_STYLE_SHADER rect 0 0 640 480 background "gfx/menus/worldmap_back" forecolor 1 1 1 1 visible 1 decoration }

itemDef { name eyecandy1 group none style WINDOW_STYLE_SHADER rect 17 309 357 153 background

"gfx/menus/worldmap_bottomleft_grid" forecolor 1 1 1 1 visible 1 decoration }

itemDef { name botlf group none style WINDOW_STYLE_SHADER rect 0 300 80 180 background "gfx/menus/worldmap_bottom_left" forecolor 1 1 1 1 visible 1 decoration }

itemDef { name starfield group none style WINDOW_STYLE_FILLED rect 20 20 600 256 background "gfx/menus/star_field" backcolor 1 1 1 1 visible 1 decoration }

itemDef { name stars_close group none style WINDOW_STYLE_FILLED rect 20 20 600 256 background "gfx/menus/star_field_zoom" backcolor 1 1 1 0 visible 1 decoration }

//---------------------------------------------------------------------------------------------- // ZOOMED CITY GRAPHICS //---------------------------------------------------------------------------------------------- itemDef { name myag group none style WINDOW_STYLE_FILLED rect 320 148 0 0 background "gfx/menus/locations/myag" backcolor 1 1 1 1 visible 1 decoration } itemDef { name camp group none style WINDOW_STYLE_FILLED rect 320 148 0 0 background "gfx/menus/locations/camp" backcolor 1 1 1 1 visible 1 decoration }

//---------------------------------------------------------------------------------------------- // WORLD MAP //---------------------------------------------------------------------------------------------- itemDef { name worldmap group none style WINDOW_STYLE_FILLED rect 64 20 512 256 background "gfx/menus/world_map" backcolor 1 1 1 1 visible 1 decoration }

itemDef { name map_title type ITEM_TYPE_TEXT rect 40 14 600 18 text @WORLDMAP_MAPTITLE font 2 forecolor .549 .854 1 1 textscale 1 textalign ITEM_ALIGN_CENTER textalignx 300 textaligny -1 visible 1 decoration } //---------------------------------------------------------------------------------------------- // LOCATION MARKERS ON WORLD MAP //---------------------------------------------------------------------------------------------- itemDef { name loc_but01_off group location_marker_off style WINDOW_STYLE_SHADER rect 239 188 32 32 background "gfx/menus/mission_loc_but_off" forecolor 1 1 1 1 visible 1 decoration cvartest "tiers_complete" disablecvar { "myag" } cvarSubString }

itemDef { name loc_but01_on group location_marker_on style WINDOW_STYLE_SHADER rect 239 188 32 32 background "gfx/menus/mission_loc_but_on" forecolor 1 1 1 1 visible 0 decoration cvartest "tiers_complete" disablecvar { "myag" } cvarSubString }

itemDef { name loc_but02_off group location_marker_off style WINDOW_STYLE_SHADER rect 239 188 32 32 background "gfx/menus/mission_loc_but_off" forecolor 1 1 1 1 visible 1 decoration cvartest "tiers_complete" disablecvar { "camp" } cvarSubString }

itemDef { name loc_but02_on group location_marker_on style WINDOW_STYLE_SHADER rect 239 188 32 32 background "gfx/menus/mission_loc_but_on" forecolor 1 1 1 1 visible 0 decoration cvartest "tiers_complete" disablecvar { "camp" } cvarSubString }

itemDef { name loc_but03_off group location_marker_off style WINDOW_STYLE_SHADER rect 216 122 20 20 background "gfx/menus/mission_loc_but_off" forecolor 1 1 1 1 visible 1 decoration cvartest "tiers_complete" disablecvar { "t1_fatal" } cvarSubString }

itemDef { name loc_but03_on group location_marker_on style WINDOW_STYLE_SHADER rect 216 122 20 20 background "gfx/menus/mission_loc_but_on" forecolor 1 1 1 1 visible 0 decoration cvartest "tiers_complete" disablecvar { "t1_fatal" } cvarSubString }

itemDef { name loc_but04_off group location_marker_off style WINDOW_STYLE_SHADER rect 301 161 32 32 background "gfx/menus/mission_loc_but_off" forecolor 1 1 1 1 visible 1 decoration cvartest "tiers_complete" disablecvar { "t1_danger" } cvarSubString }

itemDef { name loc_but04_on group location_marker_on style WINDOW_STYLE_SHADER rect 301 161 32 32 background "gfx/menus/mission_loc_but_on" forecolor 1 1 1 1 visible 0 decoration cvartest "tiers_complete" disablecvar { "t1_danger" } cvarSubString }

itemDef { name loc_but05_off group location_marker_off style WINDOW_STYLE_SHADER rect 320 128 28 28 background "gfx/menus/mission_loc_but_off" forecolor 1 1 1 1 visible 1 decoration cvartest "tiers_complete" disablecvar { "t1_rail" } cvarSubString }

itemDef { name loc_but05_on group location_marker_on style WINDOW_STYLE_SHADER rect 320 128 28 28 background "gfx/menus/mission_loc_but_on" forecolor 1 1 1 1 visible 0 decoration cvartest "tiers_complete" disablecvar { "t1_rail" } cvarSubString }

itemDef { name location_name type ITEM_TYPE_TEXT rect 52 316 288 24 font 2 forecolor .549 .854 1 1 textscale .8 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 0 autowrapped decoration } //---------------------------------------------------------------------------------------------- // TIER 1 MISSION BUTTONS //---------------------------------------------------------------------------------------------- itemDef { name map_title type ITEM_TYPE_TEXT rect 10 305 400 20 text @WORLDMAP_MYAG font 2 forecolor .549 .854 1 1 textscale 1 textalign ITEM_ALIGN_CENTER textalignx 200 textaligny -1 visible 1 } itemDef { name location_myag group location_button type ITEM_TYPE_BUTTON rect 52 330 224 20 text @WORLDMAP_MYAG desctext @MENUS_CLICK_BRIEFING font 2 forecolor 1 .682 0 1 textscale .7 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 1 cvartest "tiers_complete" disablecvar { "myag" } cvarSubString

mouseEnter { hide loc_but01_off show loc_but01_on show location_name setitemtext location_name

@WORLDMAP_MYAG setitemrect location_name 150 230 120

26

show button_glow setitemrect button_glow 20 328 380

22 }

mouseExit { hide loc_but01_on show loc_but01_off hide location_name hide button_glow }

action { play

"sound/weapons/force/protect.wav" fadeout starfield fadeout worldmap fadein stars_close transition2 loc_but01_off 255 204 0 0 20 25 transition2 loc_but02_off 255 204 0 0 20 25 transition2 loc_but03_off 226 132 0 0 20 25 transition2 loc_but04_off 317 177 0 0 20 25 transition2 loc_but05_off 334 142 0 0 20 25

transition2 location_name 270 250 256

20 20 15 transition2 myag 192 20 256 256 10 15 hide location_button

hide location_marker_on show backbut show accbut1 show briefing_background show briefing_text setitemtext briefing_text

@WORLDMAP_MYAG_DESC hide button_glow hide map_title

} }

itemDef { name location_camp group location_button type ITEM_TYPE_BUTTON rect 52 353 224 20 text @WORLDMAP_CAMP desctext @MENUS_CLICK_BRIEFING font 2 forecolor 1 .682 0 1 textscale .7 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 1 cvartest "tiers_complete" disablecvar { "camp" } cvarSubString

mouseEnter { hide loc_but02_off show loc_but02_on

show location_name setitemtext location_name

@WORLDMAP_CAMP setitemrect location_name 150 230 120

26

show button_glow setitemrect button_glow 20 351 380

22 }

mouseExit { hide loc_but02_on show loc_but02_off

hide location_name hide button_glow } action { play

"sound/weapons/force/protect.wav" fadeout starfield fadeout worldmap fadein stars_close transition2 loc_but01_off 255 204 0 0 20 25 transition2 loc_but02_off 255 204 0 0 20 25 transition2 loc_but03_off 226 132 0 0 20 25 transition2 loc_but04_off 317 177 0 0 20 25 transition2 loc_but05_off 334 142 0 0 20 25 transition2 myag 192 20 256 256 10 15

transition2 location_name 270 250 256

20 20 15 hide location_button hide location_marker_on show backbut show accbut2 show briefing_background show briefing_text setitemtext briefing_text

@WORLDMAP_CAMP_DESC hide button_glow hide map_title

} }

itemDef { name miss3 group location_button type ITEM_TYPE_BUTTON rect 52 376 224 20 text @MENUS_T1_FATAL_TITLE desctext @MENUS_CLICK_BRIEFING font 2 forecolor 1 .682 0 1 textscale .7 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 1 cvartest "tiers_complete" disablecvar { "t1_fatal" } cvarSubString

mouseEnter { hide loc_but03_off show loc_but03_on show location_name setitemtext location_name

@MENUS_BAKURA setitemrect location_name 120 120 120

26 show button_glow setitemrect button_glow 20 374 380

22 } mouseExit { hide loc_but03_on show loc_but03_off hide location_name hide button_glow } action { play

"sound/weapons/force/protect.wav" fadeout starfield fadeout worldmap fadein stars_close transition2 loc_but01_off 255 204 0 0 20 25 transition2 loc_but02_off 255 204 0 0 20 25 transition2 loc_but03_off 226 132 0 0 20 25 transition2 loc_but04_off 317 177 0 0 20 25 transition2 loc_but05_off 334 142 0 0 20 25 transition2 bakura 192 20 256 256 10 15 transition2 planet_name 270 250 256

20 20 15 hide location_button hide location_marker_on show backbut show accbut3 show briefing_background show briefing_text setitemtext briefing_text

@BRIEFINGS_T1_FATAL hide button_glow hide map_title

} }

itemDef { name miss4 group location_button type ITEM_TYPE_BUTTON rect 52 399 224 20 text @MENUS_T1_DANGER_TITLE desctext @MENUS_CLICK_BRIEFING font 2 forecolor 1 .682 0 1 textscale .7 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 1 cvartest "tiers_complete" disablecvar { "t1_danger" } cvarSubString

mouseEnter { hide loc_but04_off show loc_but04_on show location_name setitemtext location_name

@MENUS_BLENJEEL setitemrect location_name 300 200 120

26 show button_glow setitemrect button_glow 20 397 380

22 } mouseExit { hide loc_but04_on show loc_but04_off hide location_name hide button_glow }

action { play

"sound/weapons/force/protect.wav" fadeout starfield fadeout worldmap fadein stars_close transition2 loc_but01_off 255 204 0 0 20 25 transition2 loc_but02_off 255 204 0 0 20 25 transition2 loc_but03_off 226 132 0 0 20 25 transition2 loc_but04_off 317 177 0 0 20 25 transition2 loc_but05_off 334 142 0 0 20 25 transition2 blenjeel 192 20 256 256 10 15 transition2 planet_name 270 250 256

20 20 15 hide mission_button hide location_marker_on show backbut show accbut4 show briefing_background show briefing_text setitemtext briefing_text

@BRIEFINGS_T1_DANGER hide button_glow hide map_title

} }

itemDef { name miss5 group mission_button type ITEM_TYPE_BUTTON rect 52 422 224 20 text @MENUS_T1_RAIL_TITLE desctext @MENUS_CLICK_BRIEFING font 2 forecolor 1 .682 0 1 textscale .7 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 1 cvartest "tiers_complete" disablecvar { "t1_rail" } cvarSubString

mouseEnter { hide loc_but05_off show loc_but05_on show location_name setitemtext location_name

@MENUS_CORELLIA setitemrect location_name 380 120 120

26 show button_glow setitemrect button_glow 20 420 380

22 } mouseExit { hide loc_but05_on show loc_but05_off hide location_name hide button_glow } action { play

"sound/weapons/force/protect.wav" fadeout starfield fadeout worldmap fadein stars_close transition2 loc_but01_off 255 204 0 0 20 25 transition2 loc_but02_off 255 204 0 0 20 25 transition2 loc_but03_off 226 132 0 0 20 25 transition2 loc_but04_off 317 177 0 0 20 25 transition2 loc_but05_off 334 142 0 0 20 25 transition2 corellia 192 20 256 256 10 15 transition2 location_name 270 250 256

20 20 15 hide mission_button hide location_marker_on show backbut show accbut5 show briefing_background show briefing_text setitemtext briefing_text

@BRIEFINGS_T1_RAIL hide button_glow hide map_title

} }

//---------------------------------------------------------------------------------------------- // MISSION BRIEF TEXT //---------------------------------------------------------------------------------------------- itemDef { name briefing_background group none style WINDOW_STYLE_FILLED rect 42 314 320 114 backcolor 0 0 .35 .7 forecolor 1 1 1 1 border 1 bordercolor 0 0 .8 1 visible 0 decoration } itemDef { name briefing_text type ITEM_TYPE_TEXTSCROLL rect 42 314 320 114 text @BRIEFINGS_T1_SOUR font 4 forecolor 1 1 1 1 textscale 1 textalign ITEM_ALIGN_LEFT textalignx 0 textaligny -1 lineHeight 18 visible 0 autowrapped } //---------------------------------------------------------------------------------------------- // GENERAL BACK BUTTON - if you don't want this mission //---------------------------------------------------------------------------------------------- itemDef { name backbut type ITEM_TYPE_BUTTON rect 52 430 172 24 text @MENUS_BACK_CAPS desctext @MENUS_DIFF_MISSION font 2 forecolor 1 .682 0 1 textscale .8 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 0 mouseEnter { show button_glow setitemrect button_glow 15 430 200

20 } mouseExit { hide button_glow } action { play "sound/interface/esc.wav"

fadein starfield fadein worldmap fadeout stars_close transition2 loc_but01_off 239 188 32 32 20

25 transition2 loc_but02_off 239 188 32 32 20

25 transition2 loc_but03_off 216 122 20 20 20

25 transition2 loc_but04_off 301 161 32 32 20

25 transition2 loc_but05_off 320 128 28 28 20

25 hide backbut hide location_name hide accbuttons

hide briefing_text hide myag hide camp hide briefing_background hide button_glow show location_button show map_title

} }

//---------------------------------------------------------------------------------------------- // ACCEPT BUTTONS - IF YOU CHOOSE A PARTICULAR MISSION //---------------------------------------------------------------------------------------------- itemDef { name accbut1 group accbuttons type ITEM_TYPE_BUTTON rect 268 430 172 24 text @MENUS_ACCEPT desctext @MENUS_ACCEPT_MISSION font 2 forecolor 1 .682 0 1 textscale .7 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 0 mouseEnter { show button_glow setitemrect button_glow 200 430 200

20 } mouseExit { hide button_glow } action { hide backbut hide briefing_text show kyle show nextscreen_button show accept1text playVoice "sound/chars/kyle/07kyk001.mp3" hide accbuttons setfocus nextscreen_button setcvar tier_mapname "maptransition camp" hide button_glow hide briefing_background } }

//---------------------------------------------------------------------------------------------- // MODELS FOR V-O //---------------------------------------------------------------------------------------------- itemDef { name luke group models type ITEM_TYPE_MODEL rect 415 285 149 149 model_g2anim "BOTH_STAND1_TALK2" model_g2skin

"models/players/luke/model_menu.skin" asset_model "models/players/luke/model.glm" model_angle 180 //mins maxs format is apparently z x y (hmmm... y x z?) model_g2mins 15 -20 18 model_g2maxs 60 20 55 model_rotation 0 model_fovx 10 model_fovy 10 isCharacter 1 visible 0 decoration }

itemDef { name kyle group models type ITEM_TYPE_MODEL rect 415 288 145 145 model_g2anim "BOTH_STAND1_TALK2" model_g2skin

"models/players/kyle/model_menu.skin" asset_model "models/players/kyle/model.glm" model_angle 180 model_g2mins 15 -20 18 model_g2maxs 60 20 55 model_rotation 0 model_fovx 10 model_fovy 10 isCharacter 1 visible 0 decoration }

itemDef

//---------------------------------------------------------------------------------------------- // BRIEFING SUBTITLES //---------------------------------------------------------------------------------------------- itemDef { name accept1text type ITEM_TYPE_TEXTSCROLL rect 30 316 320 130 text @T1_SOUR_07KYK001 font 2 forecolor 1 1 1 1 textscale .8 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 lineHeight 18 visible 0 autowrapped }

//---------------------------------------------------------------------------------------------- // NEXT BUTTONS - to go to next screen //---------------------------------------------------------------------------------------------- itemDef { name nextscreen_button type ITEM_TYPE_BUTTON rect 530 440 172 24 text @MENUS_NEXT desctext @MENUS_ADVANCE_NEXT font 2 forecolor 1 .682 0 1 textscale .7 textalign ITEM_ALIGN_LEFT textalignx 8 textaligny -1 visible 0

mouseEnter { } mouseExit { } action { play "sound/interface/menuroam.wav" close all open ingameForceSelect } }

} }

It still contains some left over stuff from ingametier1...But that shouldn't interfere.




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#5 7 years ago

U can easily just modify the txt file that BehavED saves. You can rewrite the menu, and win :D




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#6 7 years ago

Pffft, we don't need your fancy 'logic' here jk3editor :rolleyes:




M.Eales

227272-Epic Userid

50 XP

26th April 2010

0 Uploads

140 Posts

0 Threads

#7 7 years ago

Um is anything Blatantly wrong with my menu?




Jeff_Katarn

jediwannabe on

50 XP

1st January 2011

0 Uploads

218 Posts

0 Threads

#8 7 years ago

Does any message appear at the console when you try to call the menu? Are you sure the menu name was added at menus.txt?




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#9 7 years ago

If it's just the main menu, I don't think he should need to add it to menus.txt.




M.Eales

227272-Epic Userid

50 XP

26th April 2010

0 Uploads

140 Posts

0 Threads

#10 7 years ago
Jeff_Katarn;5558720Does any message appear at the console when you try to call the menu? Are you sure the menu name was added at menus.txt?

Found some errors when I added it to jampmenus.txt, Cannot Parse line 22 or something, Invalid CVAR Strike at Line 32,42 etc.

I'll try redoing my menu, atleast its being noticed now, thanks :)