ui menu buttons
Moderator: Moderators
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
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.
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.
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
i'm hoping now but this sounds right
Code: Select all
parm.other stufftext "pushmenu_dm test_widget"hope this helps, prob not cos it's all foreign 2 me :-/
stufftext
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.
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.
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
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
http://pages.sbcglobal.net/tltrude/Temp ... uttons.zip
Correct me if I'm wrong, but with this script, every player is checked on "sending a morse code signal"
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
Code: Select all
for(local.i=1;local.i<= $player.size;local.i++)
{
if($player[local.i].monitor != 1)
$player[local.i] thread monitor
}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
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 .

