lfnetwork.com mark read register faq members calendar

Thread: Opening .menu files by using trigger_multiple
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 11-15-2007, 09:41 AM   #1
SMoKE
Rookie
 
SMoKE's Avatar
 
Join Date: Aug 2004
Location: Norway
Posts: 125
Opening .menu files by using trigger_multiple

Heyhey
I'm wondering if anyone has an idea of how to make so that when a trigger_multiple is used, a .menu pops up?

I've been looking around in g_trigger.c, and i *think* that I have to add it somewhere in void Touch_Multi( gentity_t *self, gentity_t *other, trace_t *trace ), but I dunno for sure exactly what I shall add.

I also looked in ui_shared.h and ui_shared.c, where the function menuDef_t *Menus_ActivateByName(const char *p) is defined, but I can't seem to #include the file in g_trigger.c or anything.

Suggestions, anyone? Maybe the RPG modders has a clue?
/me is noob... -_-


SMoKE Designs
Website | Forums

The Matrix Unleashed
Website | Forums

The Knights of the Old Republic Series
Website | Forums
SMoKE is offline   you may: quote & reply,
Old 11-15-2007, 11:33 AM   #2
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
You can't achieve this by a server modification only, sorry.

You would send something like trap_SendServerCommand(clientNumTouching, "openMenu menuNum");

in cg_servercmds.c you would intercept "openMenu" in CG_ServerCommand() similar to scl, but use a switch that determines the number to open certain menus. This will also require you to modify the UI to open a certain named menu then from which trap_OpenUIMenu can handle. See _UI_SetActiveMenu in ui_main.c for that.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 11-15-2007, 12:27 PM   #3
SMoKE
Rookie
 
SMoKE's Avatar
 
Join Date: Aug 2004
Location: Norway
Posts: 125
Smooth, thanks alot; it works! xD


SMoKE Designs
Website | Forums

The Matrix Unleashed
Website | Forums

The Knights of the Old Republic Series
Website | Forums
SMoKE is offline   you may: quote & reply,
Old 11-15-2007, 06:34 PM   #4
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
No problem.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Opening .menu files by using trigger_multiple

Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:38 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.