Page 2 of 3

Posted: Sun May 30, 2004 1:30 am
by nuggets
also waiting on answer here BD, i don't use sever/client based mods only things i know will be player specific or map specific if need be... HELP!!

Posted: Sun May 30, 2004 2:39 am
by bdbodger
The only way I can see is if you start the game as a dedicated server and somehow put the rcon password and address into the script . Then put stuffcommand "rcon floor_select 1" on the button for floor 1 for example . Then join your own server to play by starting mohaa as a client . If you don't want to make it a dedicated server you need rcon for other players and non rcon commands for yourself .

rcon

Posted: Sun May 30, 2004 3:50 am
by tltrude
I think I see what you're saying, but isn't there some other way we can get this to work? There must be other options to get the player's input form the button menu to the server. When a player selects a team or a weapon with his mouse, the info is sent to the server and the server relays that info to all clients.

Would it be better to put the menu control thread in a global script? I know there is a trigger called "relay", but I don't really know what its used for.

When I use the trigger now, my mouse pointer pops up and I can not use mouse look until I select a floor and the menu closes. Would it be possible to use keyboard inputs to select the floor--just like the controls for a vehicle? That way the menu pop up would only be for information on which keys to press.

Anyway, I hope this whole idea in not a bust, because popup control panels would be a great addition to the game.

Posted: Sun May 30, 2004 4:48 am
by bdbodger
All you can do with menus is what you could do by typeing stuff into your console . Like setting cvars and commands like kill or say . If you want to show a menu you can try ui_addhud menuname and ui_removehud menuname . Those will still let you move with the menu showing I think .

Posted: Mon May 31, 2004 12:52 am
by nuggets
how about

parm.other stufftext "pushmenu test_widget"

i can't test MP :(

Posted: Mon May 31, 2004 1:34 am
by nuggets
i'm hoping now but this sounds right

Code: Select all

parm.other stufftext "pushmenu_dm test_widget"

stufftext

Posted: Mon May 31, 2004 8:38 pm
by tltrude
parm.other stufftext "pushmenu test_widget" ...seems to work, but haven't tried it with two players.

Bdbodger thinks that if we can get the buttons to activate triggers in the map, the server will know what button the client pushed. But I can't get the script to trigger a trigger_use!!!!!!!! I even put fakeplayer script_origins next to each trigger, but the triggers wont fire.

trigger $("fakeplayer" + level.floor_select) // no good
trigger $("f" + level.floor_select + "_trigger") // no good
$("fakeplayer" + level.floor_select) trigger $("f" + level.floor_select + "_trigger") // no good
etc, etc...

The triggers are named "f1_trigger" thru "f4_trigger" and the script_origins are named "fakeplayer1" thru "fakeplayer4". The fakeplayer entities are right next to their triggers and target them. The triggers work just fine when a player triggers them.

We need triggers on every floor to call the elevator anyway, but getting the ui buttons to fire them in the script is not working.

Posted: Tue Jun 01, 2004 1:22 am
by bdbodger
No I guess this is a good idea for a single player game but no matter what you do the menu will always get the server cvar I think , even if the client uses the menu . If you want you can send me what you have and I can see what I can do if I have time .

Posted: Wed Jun 02, 2004 10:46 am
by bdbodger
Well forget about what I said about your idea not working in multi player I got it to work . Not exactly as we where talking about though . What I did was use JV's morse code idea . I used the menu to do +use - use commands followed by a popmenu 0 and it worked . I think there may still be a lag issue with this but at least we got something to work . Thats the good part about haveing two computers you get to test stuff out online with yourself :)

test_buttons

Posted: Wed Jun 02, 2004 11:57 pm
by tltrude
Here is a test map for the method bdbodger is talking about. It still has a small problem if the user closes the menu with his escape key and trys to reopen it--without walking away and coming back.

http://pages.sbcglobal.net/tltrude/Temp ... uttons.zip

Posted: Thu Jun 03, 2004 12:04 am
by kai0ty
heres a thought. how bout dling a copy of disolution 4. they use buttons and the server definitely doesnt know lol. u cud look at them, or even talk to virus or error if they wanna help.

Posted: Thu Jun 03, 2004 12:33 am
by bdbodger
Not sure what you mean . We want the server to know what menu button was pressed by the client .

Posted: Thu Jun 03, 2004 12:39 am
by kai0ty
lol that part was a joke. i really just meant it for the buttons to see how to set variables.

Posted: Thu Jun 03, 2004 7:05 am
by Gizmo
Correct me if I'm wrong, but with this script, every player is checked on "sending a morse code signal"

Code: Select all

for(local.i=1;local.i<= $player.size;local.i++)
		{
			if($player[local.i].monitor != 1)
			$player[local.i] thread monitor
		}
That means, when someone manually pops the elevator menu, he can set the level.floor_select variable from anywhere in the map and therefore the destination of the elevator as soon as the trigger is pushed.

The person who pushes the elevator button will get the menu, but the elevator will also instantly move to the preset destination.

BTW: Nice work with the morse code stuff, seems useheld and fireheld can be used for multiple purphoses. I believe this way of work will be seen in many elevators from now on.

Greetingzzz...
Gizmo

Posted: Thu Jun 03, 2004 9:46 am
by bdbodger
Well gizmo I didn't want to say that out loud if you know what I mean :) this is more of an idea than anything else . There are ways to try and control that and the elevator won't do anything unless it stops moveing first . For example if you set the trigger that pops the menu open to activate the elevator for example that may help a bit . Maybe makeing sure a player is within a certain distance of one of the elevator triggers before that player can set the floor is another way .