Jump to content
Sign in to follow this  
ussmarines

BIS2_fnc_Storm work in solo but not in multi !

Recommended Posts

Hello,

hello,

I just ask for your help because I have a problem with a script storm in Arma 3.

The script as a whole is working within the Arma editor, but only a portion runs on a multiplayer server.

The script is in a file : InitPlayerLocal.sqf

In Red, They work 100% in Multi

In Black, They don't work.

_ashes = "#particlesource" createVehicleLocal (getpos player);

_ashes setParticleParams [["A3\Data_F\ParticleEffects\Universal\Universal", 16, 12, 8, 1],"","Billboard",1,4,[0,0,7],[0,2,0],1,0.000001,0,1.4,[0.05,0.05],[[1,1,1,1]],[0,1],0.2,1.2,"","",vehicle player];

_ashes setParticleRandom [0, [15, 15, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];

_ashes setParticleCircle [0.0, [0, 0, 0]];

_ashes setDropInterval 0.001;

BIS2_fnc_Storm = compile preprocessFile "Storm.sqf";

[player] call BIS2_fnc_Storm;

_veh = [HEMTT_1, HEMTT_2, HEMTT_3, HEMTT_4, HEMTT_5, HEMTT_6, HEMTT_7, HEMTT_8];

{player action["lightOn",_x]} foreach _veh;

MISSION_ROOT = call {

private "_arr";

_arr = toArray str missionConfigFile;

_arr resize (count _arr - 15);

toString _arr

};

path = MISSION_ROOT + "Sounds\Antarctic_wind.ogg";

while{true} do {playSound3D [path, player,false,getpos player,2,1,0];

Sleep 1;};

My Storm.sqf :

private ["_obj","_density","_colorCoef","_newspapers","_pos","_velocity","_relPos","_color","_alpha","_ps","_newsParams","_newsRandom","_newsCircle","_newsInterval","_times","_herald","_tribune","_result"];

_obj = _this select 0;

_density = if (count _this > 1) then {_this select 1} else {0.001}; if (_density < 0) then {_density = 0.07};

_colorCoef = if (count _this > 2) then {_this select 2} else {1}; if (_colorCoef < 0) then {_density = 1};

_newspapers = if (count _this > 3) then {_this select 3} else {true};

_pos = position _obj;

//--- Dust

_duration = 2;

_velocity = [0,7,0];

_relPos = [-((_velocity select 1) * (_duration / 2)), 0, -6];

_color = [1.0 * _colorCoef, 1.0 * _colorCoef, 1.0 * _colorCoef];

_alpha = 0.8;

_ps = "#particlesource" createVehicleLocal _pos;

_ps setParticleParams [["A3\Data_F\ParticleEffects\Universal\universal.p3d", 16, 12, 8, 0], "", "Billboard", 1, _duration, _relPos, _velocity, 1, 1.275, 1, 0, [10], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _obj];

_ps setParticleRandom [3, [70, 70, 3], [0, 0, 0], 1, 0, [0, 0, 0, 0.05], 0, 0];

_ps setParticleCircle [0.1, [0, 0, 0]];

_ps setDropInterval _density;

//--- Newspapers

_result = if (_newspapers && false) then {

_newsParams = [["\A3\Missions_PMC\gnews1.p3d", 1, 0, 1], "", "SpaceObject", 1, 5, [0, 0, 1], _velocity, 1, 1.25, 1, 0.2, [0,1,1,1,0], [[1,1,1,1]], [0.7], 1, 0, "", "", _obj];

_newsRandom = [0, [30, 30, 0], [5, 5, 0], 2, 0.3, [0, 0, 0, 0], 10, 0];

_newsCircle = [0.1, [1, 1, 0]];

_newsInterval = 0.1;

_times = "#particlesource" createVehicleLocal _pos;

_times setParticleParams _newsParams;

_times setParticleRandom _newsRandom;

_times setParticleCircle _newsCircle;

_times setDropInterval _newsInterval;

_newsParams set [0,["\A3\Missions_PMC\gnews2.p3d", 1, 0, 1]];

_herald = "#particlesource" createVehicleLocal _pos;

_herald setParticleParams _newsParams;

_herald setParticleRandom _newsRandom;

_herald setParticleCircle _newsCircle;

_herald setDropInterval _newsInterval;

_newsParams set [0,["\A3\Missions_PMC\gnews3.p3d", 1, 0, 1]];

_tribune = "#particlesource" createVehicleLocal _pos;

_tribune setParticleParams _newsParams;

_tribune setParticleRandom _newsRandom;

_tribune setParticleCircle _newsCircle;

_tribune setDropInterval _newsInterval;

[_ps,_times,_herald,_tribune]

} else {

[_ps]

};

_result

If anyone could help me to solve this problem.

Thank you in advance

cordially

ussmarines

Edited by ussmarines

Share this post


Link to post
Share on other sites

I tested your script, and everything is Ok !

Yous just have to delete in your "description.ext", the command : "respawnOnStart = 1;".

Because, you don't have in your addEventHandler, something to call the script again ! Then, when you launch your mission, you respawn before anything... and then, you don't call the script nowhere !

What i did :

- i deleted "respawnOnStart = 1;" in your description.ext.

- i added "[] execVM "player.sqf";" in "player addMPEventhandler ["MPRespawn", {player enableFatigue false;}];" (cf_ "init.sqf")=> "player addMPEventhandler ["MPRespawn", {player enableFatigue false; [] execVM "player.sqf";}];"

- i deleted a part of your "initPlayerLocal.sqf" and put it in the new file "player.sqf" :

if (local player) then {
_ashes = "#particlesource" createVehicleLocal (getpos player);
_ashes setParticleParams [["A3\Data_F\ParticleEffects\Universal\Universal", 16, 12, 8, 1],"","Billboard",1,4,[0,0,7],[0,2,0],1,0.000001,0,1.4,[0.05,0.05],[[1,1,1,1]],[0,1],0.2,1.2,"","",vehicle player];
_ashes setParticleRandom [0, [15, 15, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
_ashes setParticleCircle [0.0, [0, 0, 0]];
_ashes setDropInterval 0.001;


BIS2_fnc_Storm = compile preprocessFile "Storm.sqf";
[player] call BIS2_fnc_Storm;

_veh = [HEMTT_1, HEMTT_2, HEMTT_3, HEMTT_4, HEMTT_5, HEMTT_6, HEMTT_7, HEMTT_8];
{player action["lightOn",_x]} foreach _veh;
};

- and then, everything is OK ;)

Very good idea for a snow weather mission ;)

Have fun ;)

  • Like 1

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  

×