vosku 1 Posted February 17, 2003 I'm trying to make script which creates an object and adds it an action. But problem is in multiplayer it doesn't get that action with other players. How I can make it add action to other players too? Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 Hmm, addAction works in MP for me. How are you creating that object? Share this post Link to post Share on other sites
vosku 1 Posted February 17, 2003 I have flagpole with action which creates a blackhawk which has vehicle transport action. Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 Tried using setpos instead of createVehicle? Share this post Link to post Share on other sites
vosku 1 Posted February 17, 2003 but then i should have that blackhawk already? Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 Yes, somewhere else on the map. Share this post Link to post Share on other sites
vosku 1 Posted February 17, 2003 but the flag should be "factory" which produces that kind of blackhawks Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 What does your addAction code and everything look like? Using a script, then post it here and let's have a look Share this post Link to post Share on other sites
bn880 5 Posted February 18, 2003 3--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Vosku @ Feb. 17 2003,163)</td></tr><tr><td id="QUOTE">I have flagpole with action which creates a blackhawk which has vehicle transport action.<span id='postcolor'> Well, when you createVehicle in MP, the only machine actually running your script is the one that created the blackhawk. Therefore you will have to make sure all other machines are waiting on a variable you will make public with PublicVariable, and once the variable is set you can make these scripts act and add the action locally onevery machine. If you also create a unit to go with the UH, put the UH addAction in the init of the unit and you are done. EDIT: There are various little workarounds you can make using triggers to detect a created UH as well. Share this post Link to post Share on other sites
vosku 1 Posted February 18, 2003 ok, i'll try that. thanks Share this post Link to post Share on other sites
vosku 1 Posted February 21, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE"> Therefore you will have to make sure all other machines are waiting on a variable you will make public with PublicVariable<span id='postcolor'> Hmm, how would that happen? Trigger is not appropriate to my mission because it's like RTS and everything have to be built. I have this problem with other objects too which need action. Share this post Link to post Share on other sites
vosku 1 Posted February 21, 2003 Script looks like this: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">_UH60MG="UH60MG" createVehicle (getpos player) _UH60MG setDir (getDir player) _UH60MG addaction ["Get Cargo", "transport.sqs"]<span id='postcolor'> Share this post Link to post Share on other sites