Hello everybody.
I have started to look how we can program Mutator for Killing Floor.
I have red several tutorial like those on this thread, and some page on wiki.beyondunreal.com.
To help me to understand how all this code work, i got an idea : in my MyMutator:ostBeginPlay method, i initiate a TCP client, with the method explicated in this tutorial http://wiki.beyondunreal.com/Legacy:Creating_A_TCP_Client, and i do a myTcp.SendText to see which value are used in which method.
But there is the problem : the game freeze, soon or later. The game window is still here, but nothing move.
In the Timer function of MyMutator class, i do this :
And most of the time, it works fine during all game. If i launched a game with this mutator enabled, and if i create a TCP server with another program listening to the correct IPort , i received "myMessage", every seconds.
But if i do the same thing in other class like MyPlayerController, MyHumanPawn, or MyGameRules, the game freeze during the second wave.
In MyGameRules class, i wrote this, and the game freeze quickly :
Is it a normal use to send TCP packet in mutator code ? With so many freeze, i start to think it's not a recommended think to do.
Thanks by advance.
I have started to look how we can program Mutator for Killing Floor.
I have red several tutorial like those on this thread, and some page on wiki.beyondunreal.com.
To help me to understand how all this code work, i got an idea : in my MyMutator:ostBeginPlay method, i initiate a TCP client, with the method explicated in this tutorial http://wiki.beyondunreal.com/Legacy:Creating_A_TCP_Client, and i do a myTcp.SendText to see which value are used in which method.
But there is the problem : the game freeze, soon or later. The game window is still here, but nothing move.
In the Timer function of MyMutator class, i do this :
Code:
MyTcp.SendText("myMessage");
And most of the time, it works fine during all game. If i launched a game with this mutator enabled, and if i create a TCP server with another program listening to the correct IPort , i received "myMessage", every seconds.
But if i do the same thing in other class like MyPlayerController, MyHumanPawn, or MyGameRules, the game freeze during the second wave.
In MyGameRules class, i wrote this, and the game freeze quickly :
Code:
var myMutator MutatorRef;
...
...
function ScoreKill(Controller Killer, Controller Killed)
{
Super.ScoreKill(Killer, Killed);
MutatorRef.MyTcp.SendText(Killed.PlayerReplicationInfo.PlayerName$" killed by a "$Killer.Pawn.MenuName);
...
...
Is it a normal use to send TCP packet in mutator code ? With so many freeze, i start to think it's not a recommended think to do.
Thanks by advance.
Last edited: