MarkCode82
Member-
Content Count
196 -
Joined
-
Last visited
-
Medals
Everything posted by MarkCode82
-
It's lazy people trying to mooch off others and get money. It is despicable. And the caliber of people you find in those communities is akin to drunk, drug addicts, and plain old morons, pretending to be PhD's in computer science. And they have no clue about software engineering, or their motivations for managing a community is their lack of control in their own life and try to exert it into a videogame. Also I am no longer phased about code theft. The fact they steal it shows how utterly unintelligent they are and how incompetent they are at even basic scripting. It is childish and sad. I have managed an Altis Life server before, it attracts all the wrong people. Ones who have the mental facilities of a child and play a roleplay game distant from reality and lack the ability to grow up it reminds me of children in a daycare center playing cops and robbers or "house". And the code theft? Watch me laugh when there entire server breaks down because of flooding the scheduler with unamanged, messy inefficient code, purely because they've bogged the engine down so much, and the 30 FPS, or less performance because of the SQL database choking itself from the scheduler being full all the time or called code the locks up an entire server because it went into an infinite-loop.
-
Scripting Introduction for New Scripters
MarkCode82 replied to Ranwer135's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Scheduled code bad? or unscheduled? No neither are "bad" or "good" it's purely down to a use case basis. The scheduler only gets bogged down if a script fails to complete it's full execution, but the scheduler can be unbogged simply by using sleeps inside of the code. Also if the code originated from a scheduled environment e.g the initServer.sqf It is pretty much required. As killzone_kid brought up a while back and I made a comment about it you can go from unscheduled script to scheduled but not the reverse unless you use a "hack" like call.fsm which forces it back into the unscheduled environment. The only problem with scheduled code is time-pacing it sometimes will not complete when you expect it to complete.- 97 replies
-
As above. No. ArmA 3 life is a dead caucus waiting for vultures to pick on.
-
Emergency Lighting System
MarkCode82 replied to Venoom82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
There is ways to do this, but it requires "fine tuning" and modding. In order to get the "flaring effect" on police lights in arma 3 you need to A. create a lightpoint on the model position. and B. add what they call a BLOOM lighting flare, that and HDR is the only difference between GTA 4 and arma 3, the police vehicles in ArmA 3 were quite unrefined. ArmA 3 from my experience provides a better lighting system than GTA 4 Arma 3's lighting is so performance intensive because it does complete shadow calculations around it's area of effect. -
Arma 3 Scripting help
MarkCode82 replied to hard5c0p3k1ng's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You realise thats not a small task? If you are talking about a whitelist? What sort of Whitelist? Database? Plain text? Player ID? You need to "define" your problem more. -
Flowcharts explaining Multiplayer code systems In arma 3
MarkCode82 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Here is an execution flow-chart for those who might have difficulty working out how the isServer or isDedicated process works. I'll add some more flow-charts how other things work as well later. Tell me if it's helpful. This is based on Killzone_kids explanation for multiplayer execution states displayed here. http://killzonekid.com/arma-scripting-tutorials-basic-multiplayer-coding-summary/ -
Flowcharts explaining Multiplayer code systems In arma 3
MarkCode82 replied to MarkCode82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
http://sourceforge.net/projects/dia-installer/ Hierarchical Diagram added with full information about execution locations. -
What happens to the local variables of a terminated script?
MarkCode82 replied to Ed!'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
If all you are trying to do with clear a variable from memory. Do this _var = nil or var = nil. Alright I think I'll explain this a bit better. Local variables are existent within their scope. E.g a script say for example you have _myLocalVariable = 5; defined within the script technically, if you are using this as a function call with yourTag_fnc_someFunctionOrProceedure. When IF A. Function executes and returns a value any locally defined _variables will become undefined as, the variable doesn't exist outside of the scope. IF B. Procedure Executes and finishes, it's locally defined _variables will become undefined as the variable doesn't exist outside of the scope either. Now if you wanted to pull a locally defined variable out of a Function you can define the function and get it to return values allowing you to take the variables defined inside the function to become the variable of another instruction. Satisfactory answer? Example: private ["_x1","_y1","_x2","_y2"]; _calculateSqrdDist = [_x1,_y1,x2,y2] call BIS_fnc_distanceSqr2D; There is locally defined variables within the BIS function which returns a value which is the squared distance between point A and Point B. Which you can re-assign as another locally defined variable within another script or a globally defined variable var = _calculateSqrdDist; _var = _calculateSqrdDist; -
Private command and undefined variables
MarkCode82 replied to austin_medic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Which variables are undefined? -
Diag activeSQF Optimising
MarkCode82 replied to beno_83au's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{["%1",_x] call BIS_fnc_logFormat} forEach diag_activeSQFScripts; -
Help with optimising heli reinforcement script
MarkCode82 replied to twakkie's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Make the script less monolithic? As someone once wrote, inline functions are not free. To do this use a cfgfunctions.hpp FNC_somevar = {}; is an inline function. Also with cfgfunctions.hpp it makes managing code much easier in long term maintenance. A compiledFinal functions definition allows you to provide a tag. For example. A started cfgfunctions.hpp would be this. class heliRenforcement { tag = "HRS"; class HeliRenforcement { file = "scripts\helirenforcement"; class spawnSoldiers {}; class heliWaypointMove {}; class heliWaypointDrop {}; class heliWaypointDelete {}; class shuteDetach {}; class cleanup {}; class createVeh {}; }; }; -
Problem description: The below script is unable to spawn Lightning1_F.p3d and Lightning2_F.p3d files on an if (isServer) then {} condition yet called from debug console via Local execution or Global Execution it works. Is there anyway I could do this? The kind of error I see is the following. a3\data_f_curator\misc\lightning1.p3d: No geometry and no visual shape a3\data_f_curator\misc\lightning2.p3d: No geometry and no visual shape function names: RS_fnc_ThunderGenerator; RS_fnc_CreateLightningBolt; RS_fnc_createLightPoint; Call stack: [true] spawn RS_fnc_ThunderGenerator -> [randomised direction, X axis displacement, Y Axis Displacement,Z Axis Displacement] call RS_fnc_createLightningBolt; LightningBolt is used for reference from which the [X axis displacement, Y Axis Displacement,Z Axis Displacement] call RS_fnc_createLightpoint At which point the code then executes the playSound3D from the references to the vehicle Objects. Thunder generator loop: private ["_randomDisplacement","_randomX","_randomY","_ChanceOfSpawnRepeat" ,"_totalPlayerList","_randomlySelectedPlayer"]; _ActiveThunder = _this select 0; while {_ActiveThunder} do { if (isServer) then { if ((overcast > 0.7) && (rain > 0.6)) then { 0 setLightnings 0; _totalPlayerList = allPlayers; _randomPlayer = _totalPlayerList call BIS_fnc_selectRandom; diag_log format ["Random player was selected successfully %1",_randomPlayer]; _center = getPos _randomPlayer; diag_log format ["Random player Pos %1",_center]; _dir = floor(random 360); diag_log format ["Random player Obj Dir %1",_center]; _strikeCenter = _center; diag_log format ["Random player Obj StrikeCenter Is %1",_strikeCenter]; _RandomDisplacementValueX = floor(random 800); _RandomDisplacementValueY = floor(random 800); diag_log format ["Random Random Displacement X: %1",_RandomDisplacementValueX]; diag_log format ["Random Random Displacement Y: %1",_RandomDisplacementValueY]; _LimitValue = round(random 4); _RandomTimeFactor = [5,15] call BIS_fnc_randomInt; _AudibleDistance = [1500,2000] call BIS_fnc_randomInt; /* Thunder_01.wss (Medium Frequency) PitchLimit 3 - 2; VolumeLimit 3 - 12; Thunder_02.wss (Medium Frequency) PitchLimit 3; VolumeLimit 3 - 12; Thunder_03.wss (Highest Frequency) PitchLimit 0.80 - 1; VolumeLimit 3 - 12; Thunder_04.wss (Lowest Frequency) PitchLimit 0.90 - 1; VolumeLimit 3 - 12; thunder_05.wss (Lower Frequency) PitchLimit 0.85 - 1; VolumeLimit 3 - 11; thunder_06.wss (Higher Frequency) PitchLimit 0.90 - 1; VolumeLimit 3 - 12 */ _Thunder_01LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_02LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_03LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_04LimitsVolume = [8,15] call BIS_fnc_randomNum; _Thunder_05LimitsVolume = [8,13] call BIS_fnc_randomNum; _Thunder_06LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_01LimitsPitch = [2,3] call BIS_fnc_RandomNum; _Thunder_02LimitsPitch = [1,3] call BIS_fnc_randomNum; _Thunder_03LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _Thunder_04LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _Thunder_05LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _Thunder_06LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _SoundDataPool = ["A3\Sounds_f\ambient\thunder\thunder_01.wss", "A3\Sounds_f\ambient\thunder\thunder_02.wss", "A3\Sounds_f\ambient\thunder\thunder_03.wss", "A3\Sounds_f\ambient\thunder\thunder_04.wss", "A3\Sounds_f\ambient\thunder\thunder_05.wss", "A3\Sounds_f\ambient\thunder\thunder_06.wss"]; _testPos = [(_center select 0),(_center select 1),(_center select 2)]; diag_log format ["%1",_testPos]; _ChanceOfSpawnRepeat = random 1; _RepeatCount = round(random 3); _randomX = (_center select 0) + (_RandomDisplacementValueX - (2*_RandomDisplacementValueX)); _randomY = (_center select 1) + (_RandomDisplacementValueY - (2*_RandomDisplacementValueY)); diag_log format ["randomised X position : %1 randomised Y position : %2",_randomX,_randomY]; GRandomXY = [_randomX,_randomY]; publicVariable "GRandomXY"; if (_ChanceOfSpawnRepeat > 0.8) then { for [{_i=0},{_i <= _RepeatCount},{_i = _i + 1}] do { [_dir,_randomX,_randomY,_testPos select 2] call RS_fnc_createLightningBolt; [_dir,_randomX,_randomY,_testPos select 2] call RS_fnc_createLightPoint; diag_log format ["RandomX: %1, \n RandomY %2, \n BaseZ %3",_randomX,_randomY,_ChanceOfSpawnRepeat]; DistA = getPosATL _randomlySelectedPlayer distance [_randomX,_randomY,0]; if (round(DistA) <= 100) then { _HighestFreqCreateThun03 = _SoundDataPool select 2; playSound3D [_HighestFreqCreateThun03,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_03LimitsVolume,_Thunder_03LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 200) then { _HigherFreqCreateThun06 = _SoundDataPool select 5; playSound3D [_HigherFreqCreateThun06,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_06LimitsVolume,_Thunder_06LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 400) then { _MediumFreqCreateThun02 = _SoundDataPool select 1; playSound3D [_MediumFreqCreateThun02,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_02LimitsVolume,_Thunder_02LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 500) then { _MediumFreqCreateThun01 = _SoundDataPool select 0; playSound3D [_MediumFreqCreateThun01,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_01LimitsVolume,_Thunder_01LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 530) then { _LowerFreqCreateThun05 = _SoundDataPool select 4; playSound3D [_LowerFreqCreateThun05,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_05LimitsVolume,_Thunder_05LimitsPitch,_AudibleDistance]; }; if (round(DistA) <=700) then { _LowerFreqCreateThun04 = _SoundDataPool select 3; playSound3D [_LowerFreqCreateThun04,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_05LimitsVolume,_Thunder_05LimitsPitch,_AudibleDistance]; }; }; } else { [_dir,_randomX,_randomY,(_testPos select 2)] call RS_fnc_createLightningBolt; [_dir,_randomX,_randomY,(_testPos select 2)] call RS_fnc_createLightPoint; PV_LightningPos = [_randomX,_randomY,_testPos]; publicVariable "PV_LightningPos"; hint format ["%1",PV_LightningPos]; sleep _RandomTimeFactor; DistB = getPosATL player distance [_randomX,_randomY,0]; if (round(DistB) <= 100) then { _HighestFreqCreateThun03 = _SoundDataPool select 2; playSound3D [_HighestFreqCreateThun03,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_03LimitsVolume,_Thunder_03LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 200) then { _HigherFreqCreateThun06 = _SoundDataPool select 5; playSound3D [_HigherFreqCreateThun06,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_06LimitsVolume,_Thunder_06LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 400) then { _MediumFreqCreateThun02 = _SoundDataPool select 1; playSound3D [_MediumFreqCreateThun02,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_02LimitsVolume,_Thunder_02LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 500) then { _MediumFreqCreateThun01 = _SoundDataPool select 0; playSound3D [_MediumFreqCreateThun01,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_01LimitsVolume,_Thunder_01LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 530) then { _LowerFreqCreateThun05 = _SoundDataPool select 4; playSound3D [_LowerFreqCreateThun05,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_05LimitsVolume,_Thunder_05LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 700) then { _LoweestFreqCreateThun04 = _SoundDataPool select 3; playSound3D [_LoweestFreqCreateThun04,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_04LimitsVolume,_Thunder_04LimitsPitch,_AudibleDistance]; }; PV_LightningPos = [_randomX,_randomY,_testPos]; publicVariable "PV_LightningPos"; hint format ["%1",PV_LightningPos]; sleep _RandomTimeFactor; }; }; }; }; Create Lightning Bolt: private ["_class","_LightningObj","_duration","_time"]; _class = ["Lightning1_F","Lightning2_F"] call bis_Fnc_selectrandom; _LightningObj = _class createVehicle [100,100,100]; _LightningObj setDir (_this select 0); _LightningObj setPosAtl [_this select 1,_this select 2,_this select 3]; _duration = random 3; for "_i" from 0 to _duration do { _time = time + 0.1; _LightningObj setLightBrightness (900 + random 100); waitUntil {time > _time}; }; PV_LightningObject = _LightningObj; Create Lightpoint: private ["_LightObj"]; diag_log format ["Passed location data: X: %1\n Y:%2 \n Z: %3",_this select 0,_this select 1,_this select 2,_this select 3]; _LightObj = "#lightpoint" createvehicleLocal [_this select 0,_this select 1,_this select 2]; _LightObj setposatl [_this select 0,_this select 1,_this select 2]; _LightObj setLightDayLight true; _LightObj setLightBrightness 300; _LightObj setLightAmbient [0.2, 0.2, 0.1]; _LightObj setlightcolor [1, 1, 3]; sleep 0.15; _LightObj setLightBrightness 0; sleep (random 0.15); PV_LightPointObject = _LightObj; publicVariable "PV_LightPointObject"; deleteVehicle _LightObj; Code Above Adapated from Shpook's Ambient Lightning Script. All code above is also subject to: https://www.bistudio.com/community/licenses/arma-public-license
-
- Weather
- simulation
-
(and 3 more)
Tagged with: