Jump to content
Sign in to follow this  
alleycat

How to make scripts called by actions serverside?

Recommended Posts

I am having issues with actions being only client side (local?). For example I got an action that sets the fuel for another unit. How can I make anything that happens in teh script which is called by the action be global?

Share this post


Link to post
Share on other sites

This is the script called on the action:

sleep 2;
tank1 sidechat "Advancing.";
sleep 2;
tank1 setfuel 1;

Share this post


Link to post
Share on other sites

this should be your script

_initCode = "tank1 sidechat 'Advancing.';tank1 setfuel 1;";

tank1 setVehicleInit _initCode;

processInitCommands;

notice the ' when you use " inside other " always use the ' instead

Share this post


Link to post
Share on other sites

Wouldnt setfuel be a global command (ie if you set it on one client, its set on all clients? Doesnt make sence that it would be local... Sidechat however is local.

Share this post


Link to post
Share on other sites

Its effect is global, but it has to be run on the machine the vehicle is local to.

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  

×