-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
-
Posts posted by jshock
-
-
{typeOf _x == "ACE_bodyBagObject"} count thisList > 0
-
Yea something like:
for "_i" from 1 to 300 step 1 do { _pos = getMarkerPos format ["m_%1",_i]; //createVehicle on _pos };
-
What do you mean by this? I'm certain you can use whatever operators you want for whatever code you are programming in...Is there limitation's to only 8 operators , .. , .. ?
And to make a small note on the whole thread here, it honestly comes down to personal preference for people, there is no sure answer on these programming environments, new to scripting or not.
-
-
_radius = 50; _numPlayersByEntity = {_x distance enitity < _radius} count allPlayers;
Where entity would be:getPos object getMarkerPos "marker"
Or whatever else. -
Like I said, my code was psuedo (meaning it's the concept not actual code), isPartHead isn't a command, and if you loop through all east units every tenth of a second your loop will be extrnemly heavy and every alive east unit will have a lot of handleDamage EHs. I can't provide proper code atm from my phone, so hopefully someone else can assist in this matter.
-
On my phone, so this is pseudo, but when the event handler executes:
if !(isPartHead) then { 0; } else { 1; (or return damage dealt) };
Also, why the loop? The EH, once applied doesn't need to be applied again, also "_x" won't work unless you have it all wrapped in a forEach loop. -
-
If multiplayer testing, always use the MP editor. So hopefully the singleplayer mode comment above doesnt apply.
It's still running locally on your machine, which in light of locality, could still cause some issues in a dedicated environment. Let's just say I've never needed to use the MP editor to make a mission MP compatible.
@Niklander, it is better assumed that the player is initialised in the initPlayerLocal and initPlayerServer.
-
Nope because when you select the 'group' menu (f2), all markers are hidden.
And that's what I get for trying to answer posts too soon after waking up :p, lol.
-
2
-
-
Yes, you have to remember where the marker is before grouping it.
Or simply make it of a visible type, link them all, then make them empty again :). -
box1 setPos (getMarkerPos format ["marker_%1",floor(random 10)];);
-
1
-
-
{
if (side _x == West) then
{
_x enableFatigue false;
_x setCustomAimCoef 0.3;
_x setUnitRecoilCoefficient 0.3;
_x addEventHandler
[
"Respawn",
{
(_this select 0) enableFatigue false;
(_this select 0) setCustomAimCoef 0.3;
(_this select 0) setUnitRecoilCoefficient 0.3;
}
];
};
} foreach (playableUnits + switchableUnits);
-
1
-
-
I am curious how to make a zone with random Arty strikes that happen every 5 minutes or so. I tried MCC and saw a sexy Arty thing but not sure how to use it without MCC. I would like to have it do a Wide area strike with 82mm shells with each strike being ~40sec apart and the shelling to happen every 5min in the area marked on the map.
This script is an old one of mine (really old, as in I was still using and SHK tag which I changed to JSHK as to not steal Shuko's thunder :P), but your're more than welcome to use it as a reference, should easily be "loopable" to fit your needs.
-
2
-
-
I halfway understand it, but not enough to put anything together.I am very confused by your description of the problem and your picture.
Try and explicitly explain each side, attackers and defenders, with all the conditions for each marker movement.
-
if (hasInterface || isServer) then
this looks like little nonsense
Agreed, execute all of the following on the player or server.
-
Make sure you are using both the globabl counterparts of the commands:
https://community.bistudio.com/wiki/hideObjectGlobal
https://community.bistudio.com/wiki/enableSimulationGlobal
And make sure when using enableSimulationGlobal to execute only on the server (as detailed in the link above).
-
specifically the server init
If that is the case, then I assume that "Init_Server.sqf" is called in the init.sqf as such:
if (isServer) then {[] execVM "Init_Server.sqf";};
And if that isn't the case, and if I'm thinking correctly you are trying to call that script in the "initServer.sqf" as detailed here, and if that is the case, simply rename your "Init_Server.sqf" to "initServer.sqf", no "_" and see if that makes any difference. 100-200 objects shouldn't cause too much of an issue, disabling simulation would aid in improving performance as recommend by whiztler, however, make note of objects that you intend to be destroyed, or at least have the capability of such, cause once simulation is disabled they will not interact with anything, thus becoming relatively indestructible.
-
Are these made on mission init or dynamically on the fly.
-
Ha, that bring back memories of the TS channel and recursive functions - always with the private array! ;)
Good job there mate :)
Oh the good ol' days of the Scripters' Lounge, learned a lot and had some fun along with it :D.
-
Could also use (in trigger condition field):
{ ([thisTrigger,getPos _x,false] call BIS_fnc_inTrigger) && mineActive _x } count allMines == 0
This can be used outside of the trigger condition as well, simply replace "thisTrigger" with the name of the trigger and you can do your own custom loop or whatever pleases you :p. -
With the following you pass in the unit that is being loaded out and the loadout type:
//example exec line (in a unit's init line): [this,"RIFLEMAN"] execVM "chooseLoadout.sqf"; params ["_unit","_loadout"]; switch (toLower _loadout) do { case "rifleman": {[_unit] execVM "rifleman.sqf";}; case "sniper": {[_unit] execVM "sniper.sqf";}; case "missile specialist (at)": {[_unit] execVM "AT.sqf";}; case "missile specialist (aa)": {[_unit] execVM "AA.sqf";}; case "heavy gunner": {[_unit] execVM "heavygunner.sqf";}; case "combat life saver": {[_unit] execVM "medic.sqf";}; case "grenadier": {[_unit] execVM "grenadier.sqf";}; };
-
1
-
-
Can you post one of your loadout scripts here, and I assume they all follow the same general format aside from the actual gear in them? (At an actual computer now)
-
Correct. And to use the above it would look something like:
["RIFLEMAN"] execVM "chooseLoadout.sqf";
-
1
-
Defensive AI Patrol
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted