dchan200
Member-
Content Count
75 -
Joined
-
Last visited
-
Medals
Everything posted by dchan200
-
version 1.5 JBOY Dog [v1.5 - updated 12/21/2018]
dchan200 replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@johnnyboy I skimmed through accuracythruvolume's post and here's what I make of it: [[Doghouse, ["<t color='#3388DD'>Wakeup K9","Scripts\CreateDog.sqf"]],"addAction",true,true] call BIS_fnc_MP; accuracythruvolume assigns an addAction to each machine/player using BIS_fnc_MP. Once a player activates the addAction, said player runs 'Scripts\CreateDog.sqf' locally. In 'Scripts\CreateDog.sqf', said player runs the following (again they are running this locally, not on the server): dog1 = [_caller, "Fin_tricolour_F", (_caller modelToWorld [2,2,0]), true] call JBOY_dog_create; // Create dog. 4th parameter true means use Johnnyboy voice for commands. Which will not work as the player is not the server in a dedicated server environment. accuracythruvolume says their script worked when they hosted the mission (non-dedicated) which makes sense because they are the host/server; however, I am certain their script would fail for the other players as they are not the host. To fix this issue without removing "if (!isServer) exitwith {};", JBOY_Dog users should remoteExec JBOY's functions so they execute on the server. EDIT: this part of my post refers to accuracythruvolume's post before the removal of "if (!isServer) exitwith {};". @johnnyboy On a related note, I skimmed through your scripts and it looks like you want the majority of the scripts to run on the server? I'm not familiar with your addon, but I have a feeling not all of your scripts need to execute on the server. -
Help with prepareAO function
dchan200 replied to Midnighters's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Looks like Larrow has written a post about how to use BIS_fnc_prepareAO. Perhaps you can find some useful information there: -
I can answer your question about ACE3 specifically. ACE3 has a specific load order and mission module settings are at the end of the line. This means that if an ACE parameter is specified and forced before your mission module (server configs, mission parameters, etc) it will use those settings instead of your mission module's settings. For example: In your mission, you put down the ACE medical module and set the medical setting to Advanced. In my serverconfig.hpp, I have set the ACE medical setting to Basic and this is set to forced When I play your mission, the ACE medical setting will be Basic due to #2 Thus, you should configure your ACE mission modules to fit what you have in mind for the mission (or for communities that do not adjust their ACE settings).
-
Help with prepareAO function
dchan200 replied to Midnighters's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have not used BIS_fnc_prepareAO, but the biki says it should only take 1 variable rather than an array. Like so: (presence density) call BIS_fnc_prepareAO; And be sure to have a circular trigger called GEN_infantry where the min axis is 500m. -
Players not always getting their gear
dchan200 replied to AdirB's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@SoOCoOL I'll reiterate why theend3r's method will not work in this situation: initialization order. The unit init will run before any other script (init.sqf, etc) fires so the function will not be available at that point unless it is (a) defined in CfgFunctions or (b) you do what killzone_kid suggested. theend3r's posts refer to another scenario (running after unit init) which does not fit your use case. Give what I quoted above a try since this fits your use case: running from the unit init. Side note: -
Players not always getting their gear
dchan200 replied to AdirB's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I just get lazy sometimes (old habits), but I agree with you. @SoOCoOL Let us know how it works out and we'll go from there. -
Players not always getting their gear
dchan200 replied to AdirB's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@theend3r I understand that you can compile/preprocess any file into a function, but are you sure it works in this scenario due to the initialization order? OP and I are calling the function from the unit's init line and that is done before any of the scripts (init.sqf, etc) fires. Also, looking back at this post, the first line does not make sense. Typo? -
Can't Open Created Mission
dchan200 replied to jamez_5's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@jamez_5 Not sure of the exact cause of your problem. Could you create a new mission and then copy all files from the original mission into this new mission folder? Make sure to use the same island you used in the original mission. Let us know how that goes. -
how to setup an end game trigger when all playable units are unconscious.
dchan200 replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I took a brief look into =BTC= Quick Revive's code and they do not use setUnconscious so lifeState will not work. Instead, each unit is given a boolean btc_qr_unc (true = unconscious). Let's modify johnnyboy's code with this in mind: {!(_x getVariable ["btc_qr_unc", false])} count (playableUnits + switchableUnits) == 0; -
Players not always getting their gear
dchan200 replied to AdirB's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@theend3r If you were to put this in each unit's init would it actually be compiled N times for each player? I have not used compile/preprocessFile in this manner before but that would make sense (and bad). @SoOCoOL Sorry for this confusion. I linked killzone_kid's post thinking it would be easier compared to the way I do it, but maybe not. Instead, I added my function to description.ext (modified for your file): description.ext class CfgFunctions { class soocool { class loadout { class assignLoadout { file = "bgs.sqf"; }; }; }; }; Unit init box: [unit name,"faction","role"] call soocool_fnc_assignLoadout; Like you, I only check if the unit is local and I have not run into any problem with gear not being assigned doing it this way. No guarantees though since I'm sure your mission scale is much larger than mines. -
Can't Open Created Mission
dchan200 replied to jamez_5's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@jamez_5 Make sure your mission folder has a mission.sqm file. Filename is not case sensitive, but it should be mission.sqm. -
how to setup an end game trigger when all playable units are unconscious.
dchan200 replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe lifeState will work. -
Players not always getting their gear
dchan200 replied to AdirB's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Could you try replacing your execVM with call? I have had similar issues with assigning loadouts sometime ago and that seemed to fix it for me. Take a look at killzone_kid's post here: -
A really simple "mortar- fire" script
dchan200 replied to SturerEmil84's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Good catch, I did not realize function errors show up differently. I'm sure OP got both the function and script error but just mentioned the script error. -
@theend3r Nice picture, but it is a bit misleading for conditions 1 and 2 due to the OR condition in their code.
-
Players not always getting their gear
dchan200 replied to AdirB's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sounds like a timing problem. I got a few questions Those players that do not get the proper loadout, are they JIP? Instead of the proper loadout, what do they get? -
Using call should work, but the fix depends on the following: if one blufor unit walks into the trigger, do you want only that specific unit to activate trigger1_fnc?
-
A really simple "mortar- fire" script
dchan200 replied to SturerEmil84's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@SturerEmil84 Cool! @killzone_kid Just to further clarify, OP runs 2 lines of code back to back so that's probably why their post reports the error as _pos variable is undefined. The root cause of the error as you've correctly observed is the same one we've fixed: number and type of parameters sent to BIS_fnc_randomPos is incorrect. -
A really simple "mortar- fire" script
dchan200 replied to SturerEmil84's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Think the problem is with the parameters sent to BIS_fnc_randomPos. It should only have up to 3 (optional) parameters but the script you linked has 4. Could you try changing the following lines in the script from: _pos = [[[(getMarkerPos _marker), _radius]], "ground", ["water", "out"], {}] call BIS_fnc_randomPos; To: _pos = [[[(getMarkerPos _marker), _radius]]] call BIS_fnc_randomPos; Reason for omission of: "ground": biki says you can either have a position or tags but not both. ["water, "out"]: done by default. {}: done by default -
This is going to be a long post, so I'm going to split it into 2 parts: Possible solutions to your problem What the problem is Possible Solutions to your Problem What the Problem Is Note: code not tested
-
Mission Compatible with ACE
dchan200 replied to DmitryJDM's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Strange. Could you make a new mission and see if BI's revive is still on? The mission should be simple with just a few units, no mods, and no modules. -
help with UAV operators and multiple BIS artillery support modules.
dchan200 replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If I am reading the code right, I think the problem is that you are always checking if the previous unit had access to the support module and then giving the current unit access. I think you can fix this problem by checking if the current unit has access to the support module. Try this: _thread = [] spawn { _unit = player; while {true} do { waitUntil {_unit != player }; hintSilent " Player has changed"; [player] call TransferProviders; _unit = player; }; }; -
No idea on how to fix this, but I have experienced a similar problem when playing Warfare for too long back in Arma2. What's the server FPS when the AI starts refusing to move?
-
Triggers and Markers
dchan200 replied to fowlsunlimited's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm not familiar with how a trigger of type "Guarded by OPFOR" is supposed to activate. But, I think your trigger is most suited for the "None" trigger type so give that a try. -
[SOLVED] While do loop not executed
dchan200 replied to Faron's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Your while loop looks fine. I think the root cause of your problem is distance2D. _currentMarker is not an object or position so distance2D will throw an error. To correct this, get the marker's position using getMarkerPos. Like so: _treasureDistance = _treasure distance2D getMarkerPos(_currentMarker); Also, I would suggest replacing your while loop with a forEach loop as it is more fitting for this use case.