Event function is only triggered by events , eg. collision , scan. Also you cant (I think) assign an action to an event , it should be a function instead , and its good to have the while loops outside the event function. Dont ignore this last text , because you'll have problems in the future


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201