I'm having difficulties with the publicVariable working in a server script.
Seems like the client pc don't receive the content of a variable published by the server.
REVIVIAL PACKS SYSTEMTo stop people in my MP missions running lone Rambo tactics and dying alot, I'm using what I call 'Revival Packs' system which counts down each time a player dies. The total Rev'packs available varies from mission to mission. Lets say we start with 10. A global variable holds this number. (I'll refer to it as 'vNumRevPacks'.) PS! The 10 represent available deaths to the WHOLE squad, not for each player.
SERVER FOR REVPACK HANDLINGI'm running a serverscript handling these rev'packs, which is triggered by another global variable (Lets call it 'vRevPackFlag'). Initially the vRevPackFlag is 0 (zero), but if a player dies, this is set to -1, which again activates the server. vNumRevPacks is deducted by one - and if the total number of vNumRevPacks is equal to or greater than zero, the game continues. (A END trigger is waiting for vNumRevPacks to be -1).
TRIGGER FOR DETECTING DEATHSI am using triggers to detect if a player dies. (cond. !(alive player)) - if he/she dies - the vRevPackFlag is set to '-1' by the trigger - which activates the server script. It also broadcasts the name of the player who died using vNameOfDeadPlayer = name player; publicVariable "vNameOfDeadPlayer". PS! The trigger is a "continious" trigger.
TRIGGER FOR BROADCASTING MESSAGESWhen the server is finished subtracting 1 from the vNumRevPacks, it makes a string message - ie. vMessage = format["%1 died, you now have %2 rev'packs left.", vNameOfDeadPlayer, vNumRevPacks] - and setting a global variable 'vBroadcastMsg' to true. This global variable activates the broadcast trigger which hopefully would broadcast the message to all players ie. "ZNorQ died, you know have 4 rev'packs left.". The trigger also sets the vBroadcastMsg to false - but doesn't publicVariable it. PS! The trigger is a "continious" trigger.
AND THE PROBLEM?Well, client's receive a "scalar bool" message instead of the "ZNorQ died..." message.. I KNOW I'm using publicVariables on all variables created by the serverscript (atleast the once that is supposed to be known to all other clients - ie. the "ZNorQ died..." message..
I'm going to reinstall flashpoint and patch it with v1.91 to see if that helps.. I've had some strange things happening to my flashpoint since v1.96, don't know if anybody else have had that?
Sorry I couldn't supply you with code, because I'm at work earning my well deserved money
ZNorQ