Server not receiving client's messages in ti_before_mission_start

正在查看此主题的用户

Harmast

Master Knight
Hello.

I am having trouble sending the server some messages as a client inside ti_before_mission_start. After setting multiplayer_event_mod_debug = 400 in header_common.py I put this code in the bottom of the list of server events in module_scripts.py:

插入代码块:
	(else_try),
		(eq, ":event_type", multiplayer_event_mod_debug),
		(display_message, "@Server received debug message."),

Then, in module_mission_templates.py I put this beneath the deathmatch template in the ti_before_mission_start trigger:

插入代码块:
		(display_message, "@Sending debug message to server..."),
		(multiplayer_send_message_to_server, multiplayer_event_mod_debug),

When I try it, the server doesn't get the message. Why is that? It works if I put the above code in ti_server_player_joined, but I need the client to get some variables from the server in ti_before_mission_start.

Maybe I'm just being thick... :neutral:
 
You wont be able to do this - the client can't receive data before mission start and in fact the client shouldn't even perform this trigger because the mission is started by the server, and only then once it is started will all the other players join. Any data you wish to send to the player should be done in ti_server_player_joined.
 
后退
顶部 底部