Jump to content

Dj Rolnik

Member
  • Content Count

    143
  • Joined

  • Last visited

  • Medals

Everything posted by Dj Rolnik

  1. Okay, it does work as intended. Thank you for that. The problem is... I barely understand anything out of it which makes it hard for me to iterate on... Nevertheless, I would require a few tweaks to this solution. 1. I would like to sum up all the point values into one total value that I could display in the heading of the hint 2. I cannot rely on the class names of items within hint, but rather on their display names so I would have to convert them somehow at some point of the script. I am only planning to have a maximum of 20 items with values so to be perfectly honest, if I had a choice, I would rather go with the simpler to understand approach, provided it works, of course...
  2. Before I delve deeper into it and try to go with @_foley's approach, I am experiencing an error when going with the aforementioned method. For some reason I cannot hint the variable if I manipulate it beforehand. To be more precise, adjusting the formatting score section by adding the condition that you provided, the hintC command just says that the _itemOneHint is an undefined variable and points to the line _itemOneHint in the hintC section down below.
  3. Anyone knows if I can "skip" a variable if it's value is equal to 0? In the aforementioned example, if itemOne = 0 then skip itemOneHint altogether so it does not show?
  4. Ok, I have a different issue now. I am currently feeding the contents of the chest to hintC, but I would like to avoid hinting items that are of value "0". To explain it clearer, there will be around 20 items to be found. Not all of them will be found by each player so I would like to hint only the ones that the player HAS found, that is, which variables return more than "0". I tried to look for a solution but could not find a way to SKIP a variable if it is equal to 0. As a bonus, it would be great if it was possible to sort the results descdending by the itemPoints value (after multiplying by the amount). Currently I have it set up as follows: // Variables _itemOneValue = 1000; _itemTwoValue = 2000; //Calculations _itemOne = {_x == "item_class_1"} count magazineCargo chest2; _itemOnePoints = _itemOne * _itemOneValue; _itemTwo = {_x == "item_class_2"} count magazineCargo chest2; _itemTwoPoints = _itemTwo * _itemTwoValue; //Formatting score _itemOneHint = format ["Item One: %1 - %2 Points", _itemOne, _itemOnePoints]; _itemTwoHint = format ["Item Two: %1 - %2 Points", _itemTwo, _itemTwoPoints]; //HintC format ["%1 - Points", _nick] hintC [ _itemOneHint, _itemTwoHint ]; Anyone willing to help? Thanks!
  5. Ok, I actually got it working using this: {_x == "some_item_class_name"} count magazineCargo chest2 <gets back to working>
  6. Hey, I'm sorry, this might be something absolutely trivial, but for the love of me, I cannot get what I'm doing wrong. I am trying to add an object to the game and it keeps showing as if it was from a DLC. https://i.ibb.co/54z0G5W/Bez-tytu-u.png class CfgPatches { class PDA { units[] = {}; weapons[] = {}; requiredVersion = 1.020000; requiredAddons[] = {}; author[]= { "Dj Rolnik" }; }; }; class CfgWeapons { class ItemCore; class CBA_MiscItem_ItemInfo; class ACE_ItemCore; class pda_1 : ACE_ItemCore { scope = 2; displayName = "PDA"; dlc = ""; descriptionShort = "Whatever text"; picture = ""; model = ""; class ItemInfo: CBA_MiscItem_ItemInfo { mass = 1; }; }; }; Can someone explain to me what I'm doing wrong? Thanks, Adam
  7. Ok, can be closed. All it required was giving it a path to a model to work with. Sorry about that.
  8. Ok, so... I didn't spend too much time on it yet, but I got the basics done. I have decided to make it so that once the player secures his loot in an extraction point, it is removed from his inventory but an exact copy of it is created in a separate, distant box. I know, it is a very caveman-y solution, but I think I will go with it, unless it suddenly breaks. From that distant box I can run some commands that get the class names and amount of the items stored. Now here's where I got a bit stuck. I am trying to parse this data so that I can display it using a hintC command. So far I managed to get to work those two: magazineCargo chest2 -> ["some_item_class_name","some_item_class_name"] getMagazineCargo chest2 -> [["some_item_class_name"],[2]] Now I would like to turn it into a hintC in the format: Player name - total point value Item 1* - count - sum point value Item 2* - count - sum point value *(i don't want a class name, but the name of the object, but I think I know how to convert them later on, that is not an issue now) Problem I have is that I cannot seem to run the count command in any way that works. I was expecting to run a few of these that would count individual items and show them in this one neat prompt. However there is always some kind of error and I cannot sum the amount of items in the chest. Thanks!
  9. Hey guys, Thank you very much for your kind responses! You are right, I should just get on it, start working and then see what comes out of it. I do have a cavemen-like idea of how to best approach it. Might be primitive, but I think I have a plan on how to get it done. I will post updates as I go. Cheers!
  10. Hey, I'm having trouble executing a random code from the arrays provided. Once I reach this point in the script, how do I "run" either of the three? selectRandom [ (hint "All systems operational 1."), (hint "All systems operational 2."), (execVM "jet1.sqf") ]; Thanks in advance, Adam
  11. Dj Rolnik

    selectRandom problem

    Yep, working great now. Thank you very much!
  12. I believe that you would probably have to attach the camera to a different memory point on the UAV you're using. You would have to find it in the config for that specific UAV. For the peltors that I used in the example above it was "PiP1_demining_pos" which is the rotary arm. The thing is, in this drone that point is attached to a moving arm and thus can be somewhat directed to where you wanna look at - I am not sure if that's the same for flying UAVs. As in, they may not have a memory point which looks in the direction that the uav operator is using. I think that you can kind of work aroud it with this: screen3 setObjectTexture [0, "#(argb,512,512,1)r2t(uavrtt3,1)"]; cam3 = "camera" camCreate [0,0,0]; cam3 cameraEffect ["Internal", "Back", "uavrtt3"]; cam3 attachTo [cone3, [0,0,0]]; cam3 camSetTarget pen3; cam3 camSetFov 0.45; cam3 camCommit 0; I used this for static cameras which transmit the feed that looks from the position of cone3 to pen3 and transmit image uavrtt3. In your case, you could technically use the drone as the source and a player or anything as the target and I think it should work, but then again it's only fixed for that specific target. It really depends on what you're trying to achieve.
  13. Yep, used this in my mission a few times, but the screen loads locally to each player.
  14. Hey guys, I am trying to wrap my head around the various playMusic, say2D, playSound3D commands and am still having trouble. I would like achieve the following two things: - When a blufor player uses an action on an object, ONLY the blufor players hear a 2D sound (it has to follow the player and be heard locally, like a radio message of sort). - The same as above, but triggered when any blufor player enters a trigger. I tried various commands but am still struggling with locality of the commands. I believe that I am not using them on the correct clients, or something like that. The reason it needs to be played for side is that the mission is supposed to be PvP, so I do not want the opfor team to hear the audio. Any help will be much appreciated. Cheers!
  15. Confirmed, working just as expected. Thank you my man, much appreciated!
  16. Thank you @7erra, I will try this out as soon as possible!
  17. Hey y'all, I am working on a mission in which I would like to have a notification (BIS_fnc_showNotification) displayed to the opposite team. As in: - Blufor player enters the trigger area - All Opfor players (and only opfor players) see the predefined notification on screen I cannot wrap my head around how to execute this command for side. Is that even possible? Anybody willing to help? Thanks in advance! Dj
  18. Yes, you are right. I assumed the alternative syntax which does not seem to have done the trick. Thank you man, you just saved me a ton of headache! Дзякуй!
  19. Hmm... I did what you suggested and when entering the trigger as blufor, I still see the notification pop up. Did I mess up the syntax somehow? remoteExecCall ["notification" call BIS_fnc_showNotification, OPFOR, false];
  20. Hey everyone, I am trying to use the playSound3D function with the "local" parameter that has been introduced in 2.06, but I cannot get it to work. Either I'm not getting it or doing something wrong. Basically, when using the function syntax and putting in all the parameters the sound seems to play just fine, however as soon as I add the last parameter (either set to true or false) the sound does not play at all. What I would love to have is this function BE local, as in, the sound played to be heard only by the player triggering it. Now I know the function itself says its effect is global by default (GE), so it makes me wonder whether the "local" parameter is not working or it is something completely different. Thanks for your help in advance! https://community.bistudio.com/wiki/playSound3D
  21. Oh crap, you're right.. I have not noticed this and only assumed it's working without checking the version first. Well, I guess I did get the function right but it's just not the time to use it yet. On a separate note, looking at the Dev Tracker it says that main updates are technically scheduled to be released within around a 2 month period and it seems to have been the case with the 2.02 hitting early March and 2.04 coming in late April. Latest changes to 2.04 seem to have been early June so hoping that the 2.06 gets pushed in the nearest future. Anyone got any insight on that or any fresh info on the progress of 2.06?
  22. Hey guys, I am looking for some help and explanation on a trigger issue that I cannot seem to find a workaround for. It is most probably me being stupid and forgetting something obvious, but I will be glad if someone explained to me what I am doing wrong. I am trying to have a trigger add three hold actions (repair, rearm, reafuel) to a specific vehicle once it enters the trigger area. It is currently set up like this: Activation: Anybody Activation Type: Present Repeatable: Yes Condition: h1 in thisList; On Activation: [ h1, "Repair", "holdAction_repair_ca.paa", "holdAction_repair_ca.paa", "_this distance _target < 8", "_caller distance _target < 8", {player playMoveNow "AinvPknlMstpSnonWnonDnon_medic3"}, {}, {h1 setDamage 0; hint "Vehicle repaired";}, {player switchMove ""}, [], 10, 0, false, false ] remoteExec ["BIS_fnc_holdActionAdd", 0, h1]; [ h1, "Rearm", "holdAction_rearm_ca.paa", "holdAction_rearm_ca.paa", "_this distance _target < 8", "_caller distance _target < 8", {player playMoveNow "AinvPknlMstpSnonWnonDnon_medic3"}, {}, {h1 setVehicleAmmo 1; hint "Vehicle rearmed";}, {player switchMove ""}, [], 10, 0, false, false ] remoteExec ["BIS_fnc_holdActionAdd", 0, h1]; [ h1, "Refuel", "holdAction_refuel_ca.paa", "holdAction_refuel_ca.paa", "_this distance _target < 8", "_caller distance _target < 8", {player playMoveNow "AinvPknlMstpSnonWnonDnon_medic3"}, {}, {h1 setFuel 1; hint "Vehicle refueled";}, {player switchMove ""}, [], 10, 0, false, false ] remoteExec ["BIS_fnc_holdActionAdd", 0, h1]; On Deactivation: removeAllActions h1; So it's pretty straightforward. The problem is, the action that gets added to the helo is added the amount of times that there are players on the server. That is, if I test it in my local MP I see them added once each (correct). If I launch the mission on a server, I see all three actions doubled (one for me and one for the server it seems), and when I entered with four other players the actions were added a total of six times each. I may be forgetting something obvious, but I just want the action to be added to the vehicle once per type (one repair, one refuel, one rearm). Otherwise once you approach the vehicle it just spewes a crap tonne of actions listed in the scroll menu. Thanks in advance for your help!
  23. Okay, confirmed that the removal of the remoteExec solved the problem. That was my bad. Thanks for the help!
  24. The "h1" is just a variable name of the helo that is to land inside the trigger.
  25. Ah yes, I guess I see now. I will probably remove the remoteExec but will mess around with it a little bit more and see how it goes. Thanks man!
×