Jump to content

jedders

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About jedders

  • Rank
    Private First Class
  1. With the setpos command there is a way to define the altitude. I'm sure the way you would want to do it would be like this (someone can correct me if I am wrong): (Vehicle name) setpos [ getMarkerPos (marker) select 0, getMarkerPos (marker) select 1, (height you want)] Edited: Changed from getPos to getMarkerPos and need the select 0 and select 1 in there.
  2. Is it at all possible to create a blood stain on the ground using some sort of command linked with a hidden object or just through a command? Or is this not possible in the editor?
  3. I've looked around and found that you used to be able to use the multiplayer framework for this. However for arma 3 they changed this I heard? How would I go about globally executing a globalChat script so that all players could see the text instead of the person who activated it in arma 3?
  4. jedders

    removeAction problem

    Wow that was simple enough haha. I was thinking a bit too hard about this I think and got a bit mixed up. Thanks for helping me see straight!
  5. jedders

    removeAction problem

    The object gets the addActions from the init.sqf but I don't know how to remove those actions through this script is my issue.
  6. I have an issue with removing multiple actions from an object. The actions are first added by the init.sqf for the mission to the object. And then I want it so when you choose the mission it will remove all other actions and then add in an accept and decline action. However, I cannot seem to make it remove the actions when I name them as I am not sure where I'm going wrong. Here is the script: _target = _this select 0; // Mission select object with addAction _caller = _this select 1; // Person using the mission select addAction _accept = "Accept Find Missing Person mission"; _decline = "Decline Find Missing Person mission"; _accepted = "fmpmission.sqf"; _declined = "fmpdecline.sqf"; _mSelect = MissionSelector; // Define global varibles for removing actions. fmp = _target addaction ["Find Missing Person", "fmp.sqf"]; rs = _target addaction ["Rescue Hostage", "rh.sqf"]; dr = _target addaction ["Drug Raid", "dr.sqf"]; // Define the global varibles as local variables _id1 = fmp; _id2 = rs; _id3 = dr; // Remove all missions from mission selector. _target removeAction _id1; _target removeAction _id2; _target removeAction _id3; // Chat to tell user to confirm choice of mission. _mSelect globalChat "Please confirm your choice of mission."; // Add options to accept or decline mission to run either script. _missionaccepted = _target addAction [_accept, _accepted]; _missionaccepted = _target addAction [_decline, _declined];
  7. I have an issue with my mission select script. It consists of an object which has addAction for a mission to go on. However, I cannot seem to get it to work. I can figure out how to change a variable using the addAction (if this is even possible) and then check it with the if statement. Also I noticed an issue that it would instantly go into the if statement and not allow the user to input so I used the sleep function but I'm not sure if there is a way to script to wait until the user has used the input addAction to either accept or decline the mission. The script running is named fmp.sqf as well. Here is the code: _target = _this select 0; // Mission select object with addAction _caller = _this select 1; // Person using the mission select addAction _accept = "Accept Find Missing Person mission"; _decline = "Decline Find Missing Person mission"; // Remove all missions from mission selector. _target removeAction 0; _target removeAction 1; _target removeAction 2; // Chat to tell user to confirm choice of mission. MissionSelector globalChat "Please confirm your choice of mission."; // Add options to accept or decline mission. _missionaccepted = _target addAction [_accept, "fmp.sqf",1]; _missionaccepted = _target addAction [_decline, "fmp.sqf",0]; // Wait 5 seconds sleep 5; // Check to see what to do for mission selector if (missionaccept == 1) then { hint "Mission accepted!"; } else { hint "Mission declined!"; };
  8. Ok I wasn't sure if that is how it worked or not. Also is there a way to change the text when you hover over a unit or object? Such as if I made a rifleman could I change it to show text saying Rifle Shop instead of Rifleman? Or is this not possible with the editor?
  9. I was wondering is there anyway to make a hint specific to only one person. Such as with my script tell only the person that bought it that they bought that weapon and that they cannot afford it?
  10. I see now. Yeah that is much more efficient than my code. Never thought of assigning the locker to the players as variables to call them in either. Thank you very much!
  11. Ah right thanks. Well the bit that figures out who it is comes from the addAction to buy the weapon. But I don't know of a way to choose a locker based on the user other than the if statements is my problem.
  12. The situation with this script is that I have a money system using a variable linked to each player called money. This script uses an addAction from a weapon shop and is trying to buy the TRG. It will check the users name to see where to put the gun in relation to who bought it. It will subtract 500 pounds from the player's money value. However, since I am very new to scripting I am not too sure what is going wrong here. It tells me I'm miss a ; on line 4 but if it is an if statement it shouldn't be closing a line but opening the if statement like I have? Anyway here is the code in question (it may be pretty bad as I'm really new to scripting anything): _caller=_this select 1; _money = _caller getVariable "money"; if (_money > 500)&& _caller=James then { money=_money-500; _caller setVariable ["money",_money]; JamesLocker addweaponcargo ["arifle_TRG20_F",1]; JamesLocker addMagazinecargo ["30Rnd_556x45_Stanag",5]; Hint "TRG placed in locker with 5 magazines"; } else { if (_money > 500)&& _caller=Josh then money=_money-500; _caller setVariable ["money",_money]; JoshLocker addweaponcargo ["arifle_TRG20_F",1]; JoshLocker addMagazinecargo ["30Rnd_556x45_Stanag",5]; Hint "TRG placed in locker with 5 magazines (Josh)"; } else { if (_money > 500)&& _caller = Tom then money=_money-500; _caller setVariable ["money",_money]; TomLocker addweaponcargo ["arifle_TRG20_F",1];TomLocker addMagazinecargo ["30Rnd_556x45_Stanag",5]; Hint "TRG placed in locker with 5 magazines (Tom)"; } else { hint "You do not have the money to buy this." } };
×