Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

dupa1

Member
  • Content Count

    53
  • Joined

  • Last visited

  • Medals

Community Reputation

8 Neutral

About dupa1

  • Rank
    Lance Corporal

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 1. I want my player unit to speak in the same voice as defined in the profile. The units I placed in the editor have a selection of voices in the attributes. These seem to override the profile data, as there is no "default" option to select. 2. I want to assign a specific voice to a unit by using setSpeaker command. According to the wiki, setSpeaker has local effect. I assume tat in MP environment I need to use remoteExec to set it globally. What happens for JIP clients connecting after the voice has been set? I know remoteExec has a JIP option, but what if the player in question disconnects? Is it even necessary in first place? Edit: I tested it locally in a hosted MP game. setSpeaker changes the speaker, but after a respawn it changes (possibly to profile setting???), while calling "speaker player" still shows the value set before respawn. Bonus question: Is there a way to retrieve the settings from the .armaprofile file?
  2. 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.
  3. 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:
  4. I get the idea. Thanks for the help.
  5. 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?
  6. 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.
  7. 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?
  8. 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.
  9. 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; };
  10. 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; };
  11. I tried the HandleDisconnect EH. Querying the player scores from the _unit argument returns an empty array. Guess it's plan B.
  12. 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.
×