Jump to content
Sign in to follow this  
Schilly

Dedicated vs Local Host scripting

Recommended Posts

Hello all,

I have a script that I have been making for my unit. It is a whole training map, but I am having an issue specifically with the rifle range.

Now the rifle range works PERFECTLY fine with the help of some other BIS community members of course... However, it only works perfectly fine when it is Locally hosted by me or by someone else.

When I put the pbo of the map on a dedicated server, the only part of it that works is the chat script that someone gave to allow the use of sideChat in multiplayer and hints and such.

So if someone would be kind enough to explain to me why this is, that would be great... As I cannot understand why the dedicated server would be stopping this from working.

Code if needed...

//Variables
_l1targets = [l1t1, l1t2, l1t3, l1t4, l1t5, l1t6, l1t7, l1t8, l1t9, l1t10, l1t11, l1t12, l1t13, l1t14, l1t15, l1t16, l1t17, l1t18, l1t19, l1t20, l1t21, l1t22, l1t23, l1t24, l1t25, l1t26, l1t27, l1t28, l1t29, l1t30];

// So that the targets don't pop up by them selves.
nopop 	= 	true;

// Should be 0 but needs to be 1 to make the target count correct.
_l1foo 		= 	1;
// Current Hit count. 
_l1hc 		= 	0;
// Number of targets in the variable... For randomness.
_l1ntargets 	= 	count _l1targets;


// Script

{_x  animate["terc",1]} forEach _l1targets;

nul=["Lane 1 Rifle Range Starting in 5...","side",rangeofficer] execVM "20thSFG Scripts\mp_chat.sqf";
sleep 1;
nul=["Lane 1 Rifle Range Starting in 4...","side",rangeofficer] execVM "20thSFG Scripts\mp_chat.sqf";
sleep 1;
nul=["Lane 1 Rifle Range Starting in 3...","side",rangeofficer] execVM "20thSFG Scripts\mp_chat.sqf";
sleep 1;
nul=["Lane 1 Rifle Range Starting in 2...","side",rangeofficer] execVM "20thSFG Scripts\mp_chat.sqf";
sleep 1;
nul=["Lane 1 Rifle Range Starting in 1...","side",rangeofficer] execVM "20thSFG Scripts\mp_chat.sqf";
sleep 1;
nul=["Lane 1 Rifle Range Active...","side",rangeofficer] execVM "20thSFG Scripts\mp_chat.sqf";

while {_l1foo<21} do {

_l1rnumber = random _l1ntargets-1;
_l1rtarget = _l1targets select _l1rnumber;
_l1rtarget animate["terc", 0];
sleep 3;
if (_l1rtarget animationPhase "terc" > 0.1) then
{
_l1hc = _l1hc+1;
};  
_l1rtarget animate["terc", 1];
_l1foo = _l1foo + 1;

sleep random 5;
};
nul=[format["Lane 1 Firing Range Inactive... Final Score: %1/20.", _l1hc],"side",rangeofficer] execVM "20thSFG Scripts\mp_chat.sqf";
sleep 3;
// Reset the targets.
{_x  animate["terc",0]} forEach _l1targets;

Thanks for any help you can provide.

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  

×