Jump to content
Sign in to follow this  
kvntvan

Script not working on dedicated server

Recommended Posts

Hi, I made a simple script activated by an addaction that forces an AA gun to fire at an object in the sky to simulate AA gun tracers

["False Radar Transmission deployed","hint",true,true] call BIS_fnc_MP;
sleep 3;
bait enableSimulationGlobal true;
bait hideObjectGlobal false;
aa1 reveal bait;
aa2 reveal bait;
aa3 reveal bait;
aa1 dotarget bait;
aa2 dotarget bait;
aa3 dotarget bait;
aa1 dofire bait;
aa2 dofire bait;
aa3 dofire bait;

with the "bait" object being a BLUFOR drone and the "aa1/2/3" being CSAT Tigris AA vehicles. it is supposed to be part of a mission where a signal intelligence team spoofs a false radar transmission to bait an AA battery into firing and revealing its position, thus allowing for a spec ops team to call in an arty strike on the AA battery, allowing airborne units to paradrop onto the nearby airfield.

 

(see webm : https://a.pomf.cat/brnrxj.webm )

 

Everything works as intended in my own hosted server off my machine and in the editor, but when I try to upload it to my groups server, nothing works except for the "False Radar Transmission Deployed" hint. Would anyone happen to know why this works on my machine but not on our dedicated server? I've already tried to put it in a "if (isServer) then { };" wrap as a friend suggested but still nothing works.

 

Otherwise would anyone happen to know another way to get an AA gun to fire into the sky that would work on a dedicated server?

Share this post


Link to post
Share on other sites

Change your code and put it in an sqf (fakeradar.sqf)

hint "False Radar Transmission deployed";
sleep 3;
bait enableSimulation true;
bait hideObject false;
aa1 reveal bait;
aa2 reveal bait;
aa3 reveal bait;
aa1 dotarget bait;
aa2 dotarget bait;
aa3 dotarget bait;
aa1 dofire bait;
aa2 dofire bait;
aa3 dofire bait;

put this in your addaction code:

[[],"fakeradar.sqf"] remoteExec ["execVM",0,true];

The reason is rather simple: Code called from an addaction is only run local on the client who used the action and some of the commands you used need to be run local to the units they affect (or global on every client) to work properly.

  • Thanks 1

Share this post


Link to post
Share on other sites

Kvntvan,

 

There is a recently published script by Grumpy Old Man that uses editor placed AA assets to fire in preset directions: http://www.armaholic.com/page.php?id=31927

 

This does take away some of the immersion of the intel team "setting" the bait (you could fire off a trigger -presence or radio), but it may be worth a look if you are looking for alternatives. By the way, I really like what you've done with this mission scenario, some really cool immersion!

Share this post


Link to post
Share on other sites

Change your code and put it in an sqf (fakeradar.sqf)

hint "False Radar Transmission deployed";
sleep 3;
bait enableSimulation true;
bait hideObject false;
aa1 reveal bait;
aa2 reveal bait;
aa3 reveal bait;
aa1 dotarget bait;
aa2 dotarget bait;
aa3 dotarget bait;
aa1 dofire bait;
aa2 dofire bait;
aa3 dofire bait;
put this in your addaction code:

[[],"fakeradar.sqf"] remoteExec ["execVM",0,true];
The reason is rather simple: Code called from an addaction is only run local on the client who used the action and some of the commands you used need to be run local to the units they affect (or global on every client) to work properly.

thank you for the suggestion, unfortunately, using an sqf file and the execvm code is exactly how I had originally implemented the script.

Kvntvan,

 

There is a recently published script by Grumpy Old Man that uses editor placed AA assets to fire in preset directions: http://www.armaholic.com/page.php?id=31927

 

This does take away some of the immersion of the intel team "setting" the bait (you could fire off a trigger -presence or radio), but it may be worth a look if you are looking for alternatives. By the way, I really like what you've done with this mission scenario, some really cool immersion!

thank you! I did see it down there I will surely give it a try when I get home

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  

×