The Corinthian 0 Posted March 31, 2005 Hi guys I have made a mission using snypir's excellent Support pack that allows airstrikes to be called in via mapclicks. However the mission I am using them in is MP and the napalm effect is not shown on the clients only the server. I found out that the napalm effect needs to be created on each of the clients too. Normally I would use a trigger to run scripts on both clients and server but this is called from a mapclick and not from a trigger. My question is how do I instruct client PCs to run a script that is running on the server so that I can see this effect on the client PCs? Share this post Link to post Share on other sites
Nemesis6 0 Posted April 3, 2005 If possible, I'd like to know this, too. Share this post Link to post Share on other sites
The Corinthian 0 Posted April 5, 2005 I may be wrong but I think adjusting Snypirs scripts so that when the napalm is created it is done for each client. As far as I know the ForEach command. I am uncertain however and was looking for someone to explain this somewhat. Share this post Link to post Share on other sites
RED 0 Posted April 5, 2005 You can have the clients waiting for a global variable to be set, Bn880 has created serveral network scripts that may interest you. RED Share this post Link to post Share on other sites
The Corinthian 0 Posted April 5, 2005 Hi Red, cheers for the reply. As far as I know the napalm effect is handled inside snypirs pack and the issue with it not showing on MP games is because of the command being used to create the particle effect only being run on the server. To my knowledge if I use the FOREACH command on this line so that instead of running it for the server it runs it for everyone in the group, not just the one. How could a global variable changed help this? I am familiar with the idea of setting up a global variable but once this is detected (by trigger for example) I would then need to run the foreach command anyway in order to create the particle effects on the client PCs. Share this post Link to post Share on other sites
RED 0 Posted April 5, 2005 As I am not familiar with his script set I couldn't tell you how to change it, but this is what I am talking about: Script executed on the server by on map single click right?: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> MPvariable = 1 publicVariable "MPvariable" drop [blahblah blah] ~2 MPvariable = 0 publicVariable "MPvariable" Client (can load from init.sqs, note that a gamelogic named server must be present): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?!(local sever): exit #wait @MPvariable != 0 ?MPvariable == 1: goto "1" ?MPvariable == 2: goto "2" goto "wait" #1 drop [blahblah blah] @MPvariable == 0 goto "wait" #2 drop [blahblah blah] @MPvariable == 0 goto "wait" With this system you can have the script wait for MPvariable to equal anything other than 0, when it does it can be pointed to a section of the script to do something. I included the #2 section to show you how it can be used to handle different effects if needed. Note: MPvariable must be made to equal 0 in init.sqs Is this helpful? RED Share this post Link to post Share on other sites