Jump to content
Sign in to follow this  
vosku

Add action in mp

Recommended Posts

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? confused.gif

Share this post


Link to post
Share on other sites

Hmm, addAction works in MP for me. How are you creating that object?

Share this post


Link to post
Share on other sites

I have flagpole with action which creates a blackhawk which has vehicle transport action.

Share this post


Link to post
Share on other sites

Tried using setpos instead of createVehicle?

Share this post


Link to post
Share on other sites

but then i should have that blackhawk already?

Share this post


Link to post
Share on other sites

but the flag should be "factory" which produces that kind of blackhawks

Share this post


Link to post
Share on other sites

What does your addAction code and everything look like? Using a script, then post it here and let's have a look wink.gif

Share this post


Link to post
Share on other sites

wow.gif3--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Vosku @ Feb. 17 2003,16wow.gif3)</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

</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. confused.gif I have this problem with other objects too which need action. sad.gif

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×