Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. You will need to find the classname list from that mod and look for the NVGs that they use. (Usually found in the mod folder, in your A3 directory or PW6 directory respectively, as a pdf or txt file). That particular mod has a lot of required mods however and could be pulling the NVG class from anywhere.
  2. I think the moderators do that, I'm not sure, but if they do mark them they will get around to it when they have time.
  3. Well, JonyBIGood gave the code for every unit above: { if (side _x == east) then { _x unassignItem "NVGoggles_OPFOR"; _x removeItem "NVGoggles_OPFOR"; }; } foreach allunits; You could also use the one line command of: { if (side _x == east) then { _x unlinkItem "NVGoggles_OPFOR"; }; } foreach allunits; As stated by Beerkan and Kaylina. Placing these codes in your init.sqf should solve your issue.
  4. Do you mean removing NVGs from all or any OPFOR units?
  5. You could change the trigger type to, Guarded by, assuming Blufor. And that forces the trigger to wait to activate until it is "guarded"/occupied by a Blufor unit.
  6. No, addActions won't work like that, You could try using a case structure based on the addAction ID or a variable passed through the action, but that will take a bit of explanation...but below is an example: This would be in a sqf file named: food_drink_handler.sqf switch (_this select 3 select 0) do //Selecting the variable we will be comparing to the cases below. { Case "BuyFood": {cash = cash - 10; food = food + 1;}; //<<<basically saying if the variable coming in is equal to "BuyFood" then do blah (being change cash value and food amount), same goes for the other 3 cases below for each of their own separate variables. //addAction line would be: "P2 addAction ["Buy food","food_drink_handler.sqf",["BuyFood"],5,false,true,"",""]; Case "Eat": {food = food - 1; hunger = hunger + 10}; //addAction line would be: "P2 addAction ["Eat","food_drink_handler.sqf",["Eat"],5,false,true,"","inv_food >0"]; Case "BuyDrink": {cash = cash - 10; drink = drink + 1;}; //addAction line would be: "P2 addAction ["Buy Drink","food_drink_handler.sqf",["BuyDrink"],5,false,true,"",""]; Case "Drink": {food = food - 1; thirst = thrist + 10}; //addAction line would be: "P2 addAction ["Drink","food_drink_handler.sqf",["Drink"],5,false,true,"","inv_drinks >0"]; }; If you read this page to see what each of the "sections" between the commas within the [ ] after the addAction, you may be able to understand more of what is going on within this script: https://community.bistudio.com/wiki/addAction And what KevsnoTrev means by monitoring your hunger/thirst variables is that the action will only show up for the player to use under certain conditions/circumstances so the way he has the addAction "Drink" conditions setup above is that the action will only show up if you have a drink in your inventory (inv_drinks >0) and if your thirst level is equal to or below 25% (thirst <=25). So basically with his conditions that he put, the only time the player will get the action to drink is when he has a drink in inventory and when his thirst level is below, in this case, 25%. <-Redundant statement, I know... I would say to leave these condition checks out for the buying of the food/drink and just have a hint pop up that the player doesn't have enough cash to buy food/drink, just my opinion. That basically just helps reduce the number of "useless" calls, because if the player doesn't have a drink in his inventory, why give him the option to drink?
  7. Possibly?!?: https://community.bistudio.com/wiki/addMagazineTurret
  8. That is what I was thinking, but I was going to use a killed EH then pass the unit through to a script that created it on a pre-defined marker. I just didn't get too far with it before sleep was calling my name :p. >>>>>>Just found this as well: http://www.armaholic.com/page.php?id=22520
  9. Try putting this at the top of your init.sqf: waitUntil {(!isNull player && time > 0)};
  10. Yes that will give you the same affect for just the one object. Just make sure that the _sdv = _x; is changed over to sub as well: _trg = createTrigger ["EmptyDetector", getMarkerPos _markerCO]; _trg setTriggerArea [400, 400, 0, false]; _trg setTriggerActivation ["EAST", "NOT PRESENT", false]; _trg setTriggerStatements ["this && {{ sub = _x; //<<<<<< _sdv to sub { if (side _x == independent && {_x distance sub <= 3}) exitWith {true}; }forEach allUnits; }count [sub] == 1}", "", ""];
  11. Yeah this is basically the same thing that is in this post, however, here we are dealing with NPCs instead of actual players.
  12. Do you have the eventhandler above in the rifleman's init field? (Omitting "_unit" with "this")
  13. That is because addAction has a local effect, according to this page. So you will need another means by which to activate the reinsert or reorganize the script so that the helicopter is just waiting for a player to get in, instead of through addAction, or put the addAction on the helicopter, and that way whomever comes to the chopper can get in, scroll, and go.
  14. It may be due to this, which is from the description on the addEventHandler command: So, you might need to refer to the player as one of the elements of the "_this" array. But I'm kind of talking passed the line of my understanding on event handlers, but I figured I could give it a shot :p.
  15. ^ That looks like the money maker, could see it in my head, but couldn't actually type it all out :p.
  16. Well if your init.sqf actually looks as you put it, there are a few syntax errors (fixed below): thirst = 100; hunger = 100; inv_food = 0; inv_drinks = 0; if (inv_drinks > 0) then {P2 addAction ["Drink", "drink.sqf"]}; if (inv_food > 0) then {P2 addAction ["Eat", "eat.sqf"]}; Could be the reason you don't have any action to eat/drink. As for the cash, you may want to declare it along with your other variables (thirst, hunger, inv_drinks, inv_food) in the init.sqf so that each script sees and understands what "cash" is, because if you declared it in your cash system, without having a call to that script in your init.sqf, well, it's essentially just a .sqf file that's in the mission folder, because there is no call to it. And if you could link all files associated with this (including cash system and such), we may be able to help you out a bit more, it's better than us assuming something based on something we haven't seen.
  17. Ok, now I think I get it, I was confused by preload-ception :p. So what you may need to do is assign the vest to the player first, then add in all the gear you would want in the vest, save the gear in the vest to a variable: _vestGear = vestContainer _unit; But I don't know where to go from here, because there isn't an "unassignVest" command of any sort, to then unassign and put it in the backpack. But with the vestContainer variable you may be able to put together an addAction script to reassign the vest and then all the gear as it was saved in the vestContainer variable....maybe??? So once the player is on shore he can just scroll to "Equip Vest" and then the work is done for him...
  18. The code does exist: _units = []; { if (side _x == GUER) then { _units set [count _units, _x]; }; }forEach allUnits;//<<this needs to be changed for trigger list.
  19. You can either put the code directly in the init.sqf, or place a call to your script in the init.sqf, see if that solves the issue. EDIT: I got it to work my side, with a small change: _inc=0; { _objpos = getPos _x; _objmrk = createMarker ["Marker"+str _inc, _objpos]; _objmrk setMarkerShape "ICON"; _objmrk setMarkerType "MIL_DOT"; _objmrk setMarkerText format ["%1", typeOf _x]; _inc=_inc+1; } forEach vehicles;//<<<<The original allMissionObjects placed a marker on a lot of other things....
  20. The uniform, headgear, and 4 magazines are loading into the backpack properly? Because if the 4 mags(or only some) aren't in there I would say the backpack is too small so only the first two items (the uniform and headgear) fit inside the cargo.
  21. Are you saying that you want your diver (classname B_diver_F or whatever it is) to be preloaded with a vest at mission start via this script, or that you want the vest preloaded into the backpack for future use in the mission?
  22. I was going to make the same comment Iceman, but seeing how these were players and not NPCs, I figured I could explain it out :p.
  23. You can use the "respawn" eventhandler and within that you can have your if statements checking the specific unit's classname (i.e. Jet Pilot) and then simply have it setpos of the unit to your marker position. Put this in your init.sqf: player addEventHandler ["Respawn", { if (typeOf _this == "PilotClassname") then {_this setpos (getmarkerpos "PilotRespawn"); } else { if (typeof _this == "OtherClassname") then {..same code, different marker..} else {..so on}; }]; Sorry for the bad spacing currently doing this on my phone. And you may need some JIP checks as well, but we will see, someone may make that point hereafter my post :p. And if you don't want to use the event handler then the if statements can be used for conditions of multiple triggers that encompass the normal "respawn_west" marker, and the onAct would be your get and setpos commands. And for groups, aside from checking classname, all you would need to do is instead of "typeof player" you would do "group player" and then the other side of the == would be the group leader id or group id.
  24. It's all good and understandable, most of us were in your shoes at some point. Check your private messages for more information on starting a thread.
  25. SHIK4RI, I am unsure on their use, however, this is not the proper thread for such a question, this thread is about the use and function of the command "respawnButton", not about respawning in general, please make sure to search this forum best you can, and if you cannot find anything create your own topic. But seeing how you are new to the forums here are some links that could possibly help: http://forums.bistudio.com/showthread.php?181753-Respawn-Tents&highlight=respawn+camp%2Ftent http://forums.bistudio.com/showthread.php?177400-Respawn-Camps&highlight=respawn+camp%2Ftent
×