-
Content Count
2494 -
Joined
-
Last visited
-
Medals
Posts posted by sarogahtyp
-
-
you are ending the mission server side. This is the problem. I alreqdy showed how to do it on the client.
Also the problem which @pierremgi described persists...
-
1
-
-
If u want to get help then u need to show ur code and also how/where u execute it.
-
2 hours ago, pierremgi said:sequence: in game - return to lobby - change for another role seems to me difficult to trace. Not sure MEH "playerConnected" is firing here.
Yeah, I missed this and did not cover it in my code...
Hard to trace this server side only.
Maybe there is a smarter client side only solution by storing the chosen side in profile namespace but idk how client can detect if server actually runs the same mission session or if it was restarted. Maybe one could just use the mission time for this.
-
1 hour ago, Ibragim A said:you're using a loop in unscheduled environment
That is why I used spawn in my original code...
-
3 hours ago, Gunter Severloh said:still how are they showing up
as optional mods in the mod list,
I guess this is because of the .bikey files which he put on the server
-
29 minutes ago, Harzach said:It clearly shows that the three flag mods are not loaded on the server.
Also they are not part of the -mod parameter....
-
I would not try to copy those values but to give the AI the same target or target position. But it depends on how the player is selecting the target..
-
Above code is ready to get tested and debugged. Im not able to do this because Ive no arma 3 pc for another week and also i think i dont like to set up a dedicated server just to test this. Therefore I can help with debugging but I ll not test the code myself.
Possible problems I see:
BIS_fnc_getUnitByUID - may not return objNull when player is not spawned yet
"end1" call BIS_fnc_endMission; - idk if this is the corret end for sending player back to lobby.
If you test the code and get any error or not intended behavior just post it here and I ll try to help.
-
1
-
-
46 minutes ago, Blitzen88 said:laser designator weapons, which require batteries…I think, as magazines might mess it up..?
You could just test what is returned for a laser and then remove that classname from the array before u check if the array is empty.
-
1 hour ago, pierremgi said:Follow links.
This!
-
Forget bout exec. This is not for sqf scripts.
call is executing immediatly when used in unscheduled environment.
Everytging bout it is described here:
-
I did not have tested anything but this is the way I would try it.
initServer.sqf
SARO_playerSideArray = []; addMissionEventHandler ["PlayerConnected", { _this spawn { //time the player is forbidden to chose another side - in minutes private _restrictedChangeTime = 10; // all players with these sides chosen will get checked for side change private _restrictedSidesArray = [west, east, independent]; params ["", "_uid", "_name"]; private [ "_dummy", "_playerUnit", "_playerIndex", "_playerNotFound" ]; // wait until the connected client is spawned as player object waitUntil { sleep 1; _playerUnit = _uid call BIS_fnc_getUnitByUID; not isNull _playerUnit }; _playerSide = side _playerUnit; // exit if player did not choose a restricted side if !( _playerSide in _restrictedSidesArray ) exitWith {}; _playerIndex = SARO_playerSideArray findIf { _x select 0 isEqualTo _uid }; _playerNotFound = _playerIndex < 0; if (_playerNotFound) then { _dummy = SARO_playerSideArray pushBack [ _uid, _playerSide, diag_tickTime ]; } else { private _priorSide = SARO_playerSideArray select 1; private _timeUntilChange = (diag_tickTime - SARO_playerSideArray select 2) / 60 - _restrictedChangeTime; if ( _playerSide isNotEqualTo _priorSide and _timeUntilChange > 0 ) then { private _string = format [ "%1, before choosing another side you have to play on side %2 for another %3 minutes!", _name, _priorSide, _timeUntilChange ]; _string remoteExec ["hint", _playerUnit]; sleep 3; ["end1", BIS_fnc_endMission] remoteExec ["call", _playerUnit]; }; }; }; }];
-
2
-
-
Yeah hard to answer without the knowledge bout what u exactly want to do.
But a whole array can be shown like this:
_array = [1, 8, "nine", true, "something"];
hint str _array;
Or just the 2nd element:
hint str _array select 1;
Or every element with a delay:
{
hint str _x;
sleep 3;
} forEach _array;
-
Idk if u mean this but if i remember correct then u can toggle collision with camera in the camera settings menu where u also can set camera speed and such things. Should be reachable through a button above the view port.
-
This should get done server side. You could just store the IDs of players together with their chosen side in an array or a hashmap.
Every time a player reconnects you just look for the ID and can get its prior chosen side.
https://community.bistudio.com/wiki/Array
https://community.bistudio.com/wiki/getPlayerUID
https://community.bistudio.com/wiki/onPlayerConnected
https://community.bistudio.com/wiki/Event_Scripts#initServer.sqf
-
1
-
-
It just sets a flag on the group. You are able to TRY to prevent auto deletion with it and later you can mark it for auto deletion again.
Its the same flag as you can set with createGroup command.
Read both wiki entries to get a clue of it.
-
What you are asking for is not specific enough to help effectively.
Just describe your actual mission editing situation, what you want to achieve, what did u try and what problems do u have with it.
Also open a new topic for it!
-
QuoteReturns a list of all units, except agents, dead units or units waiting for respawn, outside and inside vehicles that were created on the following sides east, west, independent and civilian.
Its all about wiki reading:
https://community.bistudio.com/wiki/allUnits
QuoteWhen the last unit leaves its group, the group usually gets immediately auto-deleted,
-
1
-
-
I totally agree. Its not neccessary to do this server side. Also to break the loop on death and to restart it on respawn is a smart solution which avoids a dirty infinite loop.
-
1
-
-
Until the player object gets deleted.
when this happens depends on garbage collection.
Mostly those variables get useless when player dies and have to get reassigned to the new player object after respawning.
-
I had a similar thing some years ago. My vehicle was a tiny short time inside of water and therefore the engine was disabled.
I did spawn the vehicle at 0,0,0 and moved it elsewhere then.
After I changed spawning to another location the issue was solved.
-
1
-
-
-
On 7/8/2022 at 7:52 AM, sarogahtyp said:show the kick message out of your .rpt file!
Why not just doing what I requested?
-
Idk such script but creating one is possible for sure.
One could create a random key for the current mission session, store it together with the first side chosen in players profile and send player to lobby if he chooses another side during the same session...
Error Loading Mission after adding modded entities to mission
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Post .rpt file or nobody is able to help. And pls use an external code posting service or the spoiler function of the forum to post it.
Also open an own topic next time you have a problem pls.