dupa1
Member-
Content Count
51 -
Joined
-
Last visited
-
Medals
Community Reputation
8 NeutralAbout dupa1
-
Rank
Lance Corporal
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
How to tell if GPS is in "follow" mode
dupa1 replied to dupa1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh yeah. Thanks! -
How to make AI heli gunner to laze target?
dupa1 replied to kibaBG's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You don't need a script. Press Ctrl+F to switch gunner weapon. Select laser designator. Tell the AI to target something. Toggle laser on/off with Mouse1. When laser is active, it will appear as a red mark on your radar. Edit: The above will work if you are the pilot of the helicopter. -
I have a Draw EH displaying icons on GPS. When the GPS is in default mode, all is good. When I set the GPS to follow the player (with "Ctrl + [" or "Ctrl + ]"), the icons maintain the same direction regardless of the map rotation. I would like them to rotate together with the map. To do that, I would need the direction of the map, which is basically the direction of the player. Now I just need to tell if the GPS is in "follow" mode or not. Video of the problem:
-
2 questions about built in revive system
dupa1 replied to dupa1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I get the idea. Thanks for the help. -
2 questions about built in revive system
dupa1 replied to dupa1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
2. I mean execute my code when a player is being revived. Of course to add score I would need to know who did the revive. Edit: I want to add score. Edit2: "EntityRespawned" gets called when a player gets revived? -
Well, I've been messing around with ArmA coding for a long time, since SQS days. The mission I'm making now is my first serious project. I feel as if I just discovered what my schlong is for at the age of 30.
-
2 questions about built in revive system
dupa1 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I like the built in revive system, but: 1. When player is incapacitated, is it possible to prevent the AI from taking command and bossing around giving ridiculous orders? (I had this issue with all the revive scripts I tried). 2. Is it possible to give points for reviving players? -
And again, big thanks!
-
Thank you for replying. I am not certain you are correct. a = 1; b = a; b = b + 1; The above code should not modify A. There should be 2 instances of the same data, one of each is later modified. I would expect the same from profileNamespace variables. I did quite a lot of testing on this. I tried using a temporary variable, with the same result. From my observations, using the set command specifically causes this problem. I managed to build the array without using the set command and now it seems to work OK.... (the second version of the code has some mistakes) Edit: I just tried your code in the console, and it did what you said. I tried my code in the console, and it did what I said. So, it seems that arrays and scalar values are treated differently. This is new to me. Thanks for the help.
-
Update: This happens when I use the "set" command, this must be some kind of a bug. I rewrote the main loop without using the "set" command and it seems to work... for now... //initServer.sqf scoresArr = []; saveScores = { profileNameSpace setVariable ["saveData", scoresArr]; saveProfileNameSpace; "Done!"; }; while {true} do { _tempArr = []; { _uid = getPlayerUID _x; _scoreInfo = getPlayerScores _x; _found = false; {if (_x#0 == _uid) then {_tempArr pushBack [_uid, _scoreInfo]; _found = true} else {_tempArr pushBack _x}} forEach scoresArr; if !_found then {_tempArr pushBack [_uid, _scoreInfo]}; } forEach allPlayers; scoresArr = _tempArr; sleep 1; };
-
I am trying to save player scores into profileNamespace, so they can be restored after server restart. The main loop constantly updates scoresArr with player scores. The saveScores function saves is into profileNameSpace. The main loop seems to work fine. When I call the saveScores function, any subsequent updates to scoresArr seem to affect the saved data in the profileNameSpace. Here is a video of this: And the code: //initServer.sqf scoresArr = []; saveScores = { profileNameSpace setVariable ["saveData", scoresArr]; saveProfileNameSpace; "Done!"; }; while {true} do { { _scoreInfo = getPlayerScores _x; _uid = getPlayerUID _x; _uids = scoresArr apply {_x select 0}; _i = _uids find _uid; if (_i == -1) then {scoresArr pushBack [_uid, _scoreInfo]} else {scoresArr set [_i, [_uid, _scoreInfo]]}; } forEach allPlayers; sleep 1; };
-
Is there a way to access scores of disconnected players?
dupa1 replied to dupa1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I tried the HandleDisconnect EH. Querying the player scores from the _unit argument returns an empty array. Guess it's plan B. -
Is there a way to access scores of disconnected players?
dupa1 replied to dupa1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, I didn't know about this one, I only knew about playerDisconnected EH, which has no unit argument. This will definitely make my life easier. -
dupa1 started following Effects on cannon muzzle
-
Effects on cannon muzzle
dupa1 replied to BrokenGautlen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am not sure I correctly understand what you are trying to achieve, but if I'm guessing right, you want something like this: The only way I can think of is using the "drop" command and creating a particle circle manually. https://community.bistudio.com/wiki/drop -
dupa1 started following ARMA 3 - MISSION EDITING & SCRIPTING
-
Is there a way to access scores of disconnected players?
dupa1 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I want to save player scores through server restart. I have an idea how to save the scores, but I don't have an idea how to actually access them. I know about the getPlayerScores command, but it receives a unit as argument, so it would only work for connected players. So, basically, what I'm looking for is a way to access the data from the score table by script. I did have an idea of tracking the scores manually, but before doing that I decided to ask if there is a more simple way to do it.