-
Content Count
7536 -
Joined
-
Last visited
-
Medals
-
Medals
-
Community Reputation
4944 ExcellentAbout pierremgi
-
Rank
Major
Profile Information
-
Location
Tahiti
Recent Profile Visitors
27626 profile views
-
You're right Gunther. Totally agree. I vote for you as moderator. I can help also, if needed.
-
pierremgi started following A group that chases and kills all the animals that are nearby., Forum has died, Any helicopter can float with Reaction Forces DLC and and 4 others
-
DDOS attack on servers and spam/scam for a couple of weeks.
-
A lot of files! At least, in your mission.sf, you can't private the global variable totalSpawned . Remove "totalSpawned" from private array. I'm not sure (not so much time to check all the stuff) but if you call mission.sqf on server, then Edistymispalkki.sqf is on server only Right? So, no way for displaying something anywhere else than hosted server. The rule is simple : make the display local, for each server, publicVariable data from server, each time data change, if you keep the count on server only.... or addMissionHandler "entityKilled" everywhere (e.g. init.sqf) then the count can be local, with no sync on server, as far as the addition or subtraction is same for everyone. You are using plenty of hold scripts, using their own init.sqf or else... difficult to help you more in this jungle.
-
Any helicopter can float with Reaction Forces DLC
pierremgi replied to JCataclisma's topic in ARMA 3 - MISSION EDITING & SCRIPTING
[this, 'DeployFloats'] remoteExec ['lxRF_fnc_Cougar']; is not fine: this refers to the object in init field of this one. So, Each time a PC starts, this code runs. Consequences depend on the code itself. Can be local, can be global so "pollute" all other PC. In such case, remote execution is weird. the lxRF_fnc_cougar uses the setWaterLeakiness command (set to 0). This command is La Ge. that means a simple : this setWaterLeakiness 0; in init field of the object should work. Perhaps, re-run at owner's change in MP (when a player jumps as pilot) and no, that doesn't work for tanks. For planes and cars, it's just... 🤪 That works also for objects such as Airport tower! If you want to do a base or any composition at sea... just do it! See also: setWaterFillPercentage -
You should add more hints about your scripts. 1 mission.sqf ?? bad idea. there is an automatic mission.sqm and a good practice could be a different name, even with a different extension. For clarity. 2 Your sqf are present on each PC, so it should be OK for displaying normally. And locally (avoid remote execution for nuts) 3 prefer functions (in description.ext) rather than sqf (execVm compiles each time you run it). Important for a loop. 4 Initialization is important for: - initialization order - variable initialization on server only (you don't want a JIP initialize public variable). 5 so _totalSpawned should be replaced by: totalSpawned (global variable on server, made public by publicVariable "totalspawned" at start then each time the value changes). Something like : initserver.sqf : totalSpawned = 0; publicVariable "totalSpawned"; .... for some reason, on server, you spawn units then change: totalSpawned = totalSpawned +1; publicVariable "totalSpawned"; initPlayerLocal: For script calling a function for your display with totalSpawned as global variable. Same for _maxAIteams but you can save publicVariable broadcast if hard coded as a unique value (keep it simple).
-
on loadout selection, save loadout, set saved loadout on respawn.
pierremgi replied to tobias-ripper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Saving the loadout at start, recovering at respawn: in initPlayerLocal.sqf player spawn { params ["_plyr"]; sleep 2; _plyr setVariable ["ldOutAtStart", getUnitLoadOut _plyr]; _plyr addMPEventHandler ["MPRespawn", { params ["_plyr","_corpse"]; _plyr setUnitLoadOut (_corpse getVariable ["ldOutAtStart",getUnitLoadOut _plyr]); }]; }; The sleep command is not mandatory but that could secure the loadout at start if you are scripting or using mod about that. If that doesn't work, share what mod or script you are running at start (what happens with players). -
HVT capture and Hostage rescue scripts
pierremgi replied to nomadd's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Are you sure you give the same variable name everywhere (hvt or obj_hvt,...) ? -
You can select WEST weapons (and more). See this topic: Once you have your filter, use it: https://community.bistudio.com/wiki/Arma_3:_Arsenal See also this topic:
-
A group that chases and kills all the animals that are nearby.
pierremgi replied to hectrol's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi johnnyboy , To say the truth, it was a quick and dirty example. I thought about addWaypoint just for updating the position by setWaypointPosition. You're right doMove is fine. This script could be improved, for sure. I added a better aiming with modelToWorldworld and suppressFor (less ammo waste). If I'd to give a move to spawned animals, I'll probably use setDestination And the probable best use for that code needs to choose only spawned species, without rabbits in _priority variable (they spawn too often). -
A group that chases and kills all the animals that are nearby.
pierremgi replied to hectrol's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Animals in Arma? Rabbits, snakes, butterflies... Animals are spawned by engine in vicinity of the player, like this: Animals:_Ambient_System - You can add rabbits by editor (and only rabbits because other classes are not in public scope, they are protected) - you can spawn some classes like found here. - some mods add specific animals (like dromedaries by Western Sahara DLC) Side: not very handy! AMBIENT LIFE for edited rabbits (or dromedaries or else) CIVILIAN for edited by createAgent (read it from top to bottom!) UNKNOWN if spawned by engine (butterflies,mosquitos... snakes, rabbits) You can't modify the side of an animal. That said, here is a little script for hunting. Place it in init field of an AI unit: this spawn { params ["_hunter","_animals","_targets","_target"]; private _initPos = getpos _hunter; private _wpt = [group _hunter,0]; _hunter setSkill 1; private _priority = ["Rabbit_F","Dromedary_01_lxWS"]; while {sleep 2; alive _hunter} do { _animals = ((allMissionObjects "Animal" select {alive _x}) apply {_an = _x;[_priority findIf { _an isKindOf _x}, _an distance2D _hunter, _an]}); _targets = _animals select {_x#0 != -1}; _targets sort TRUE; call { if (_targets isEqualTo []) exitWith { _hunter enableAI "FIREWEAPON"}; if (isNil {_hunter getVariable "target"}) exitWith { _target = _targets #0#2; _hunter setVariable ["target",_target]; _hunter doMove getPos _target; _hunter enableAI "FIREWEAPON"; }; _target = _hunter getVariable ["target",objNull]; _hunter doMove getPos _target; if (isNull _target or !alive _target) exitWith { _hunter move _initPos; _hunter setVariable ["target",nil]; }; if (_hunter distance2D _target < 30) exitWith { doStop _hunter; _hunter doSuppressiveFire (_target modelToWorldWorld [0,0,0.5]); _hunter suppressFor 1; sleep 1; _hunter disableAI "FIREWEAPON"; sleep 2; if (alive _target && !isNull _target) then {_hunter enableAI "FIREWEAPON"}; }; }; }; }; Where: _priority is an array of your favorite animals (classes) sort by priority (here Western Sahara dromedaries for test, then rabbits). classes must comply with isKindOf command. I'm using doSuppressiveFire command to fire on a position. Not the best. Feel free to choose something else for firing an object (civilian) The hunter seems to shoot too many bullets, the reason why I tried to dim that by disabling /enabling its FIREWEAPON ability. -
We don't have the same script. https://forums.bohemia.net/forums/topic/317664-player-leave-ai-group/?do=findComment&comment=3594257 Everything works fine for me. I can't understand why you can have multiple dismissal, tested multiple Join/dismiss. There is no reason for adding another action on a AI unit! So, you did something on your side, a loop or else... I can't say. I keep the "leaving group" option, working fine, after a respawn... the script has been corrected for that, as you required. So, if you can't find this action menu after a normal respawn (BI respawn system) I can't understand. That's the first time I read the MPEH MPRespawn fails. I hope you don't try 2 codes at the same time... or add multiple mods already managing stuff on respawn. No clue about what to do more.
-
Spawned in game or edited (i.e. existing at start)?
-
Did you test the last script? I added an MPEH for respawn. That works on respawn! Eliminated? if player13 (or 14) respawns in MP, that doesn't change anything for him. They are still player13 (or14) as variable name. The respawn EH throws the addAction on new unit. So, I don't understand what "eliminated" means. Did you name two slots with player13 and player14? If not, what are characters 13 and 14 ? What means "eliminated"? What occurs? respawn, back to lobby? How can they still play if eliminated?
-
Script not working on server
pierremgi replied to G.Drunken's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
That's a wide MP topic. For example, the weather broadcast, the fact it rains or not, the fact players can't see same clouds,... all shared (braoadcast) data can drastically impact on server flow. Synchronisation is managed by Arma 3's engine, not supposed to be the best engine for multiplayer. Let's see the case for bullets, fired by each client! If I remember (I'm not specialist for that), bullets are local and that saves bandwidth. On the other hand, flying missiles, grenades are global (like planes), so synced (for the display). But all these projectiles (small & fast or big & slow) are owned by the "shooter" (?) Don't ask me for the case of a vehicle (so belonging to the driver) when another player, gunner, fires from the turret. The projectile is probably owned by the turret owner. Furthermore, It seems to me that the hits are local, then damages are shared by broadcast. Someone more skilled with that could provide far better explanation than mine. Anyway, demanding codes should be executed locally each time it's possible. Multiplayer_Scripting Code_Optimisation Something relevant, imho: a MP scenario should use: - simple objects each time it's possible ( for static scenery like camping table "Land_CampingTable_F", chairs...); That disable possible simulation. - edited objects locally (see in editor the attributes of object: local only), or scripted by createVehicleLocal for plenty of props like ruins (looks like simple object but this option is not in editor), but also particles (sure, you'll never see the absolutely same particles as another player can see, but who cares?) ; - if possible, disabled simulation (can be destroyed but no more input like collision, object frozen example: rotating antenna or turret frozen, impossibility for embarking/disembarking such vehicles); - and most of time: dynamic simulation. -
Script not working on server
pierremgi replied to G.Drunken's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
That's probably because things are glitchy, to say the least, when you try to modify/attach object from server. This can't be easily done on each frame. I think you'll experience more and more glitches for clients, especially when you add this kind of script in an "heavy" scenario. (a simple test can pass, depending on your PC) The first thing I'll do is to replace: if (isServer) then { createVehicle ....} by: createVehicleLocal ... This way, a Spartan is created locally, on each PC and not synced to server.