Community Forum

Broadcast Event (Server MP)

Forum Overview >> Farming Simulator 2011

CategoryFarming Simulator 2011
Created16.12.2010 19:44


Harry Paul Jones (Unknown) 16.12.2010 19:45
Hello , Wonder what is the function to broadcast the event , such as a nimation or action , all ive gathered is

function Combine:updateTick(dt)
if self.anim ~= self.sentanim or self.anim ~= self.sentanim then
g_server:broadcastEvent(anim:new(self, self.anim, self.anim), nil, nil, self);
self.sentanim = self.anim;
self.sentanim = self.anim;
end;
end;

and im not sure if that is the correct frame.

Stefan Geiger - GIANTS Software 27.12.2010 11:43
You also need to add if self.isServer then
around your code, since the broadcastEvent only is allowed on the server.

The code you posted otherwise looks correct. However I don't know what the anim event looks like? It should implement the read and writeStream functions to send/read all necessary data.


Note: Log in to post. Create a new account here.