Jump to content

vapour

Member
  • Content Count

    38
  • Joined

  • Last visited

  • Medals

Community Reputation

12 Good

About vapour

  • Rank
    Private First Class
  1. Hi good gents. I am sick of banging my head against a wall over a simple little script. This is for an MP PvP mission where there are two resistance players (E1 and E2) and a bunch of player blufor hunters. I want a trigger to go off, which will essentially be the "win" trigger for blufor. The trigger needs to go off when all resistance players are captive (because of ACE handcuffs) and present in a holding cell (represented by an area trigger). A couple of things make this slightly tricky though. 1) Sometimes there may be only one person playing as resistance, not necessarily two. If only one resistance player, the other resistance character will not be present in the mission as AI either. 2) I don't want the trigger to go off if only one resistance guy is captured, as the other fella may be there to rescue him. Issues I've encountered so far is that when captured, the script command "side" will register E1 and E2 as being civilian, not resistance - so I've found faction _x == "IND_F" may be a good work around. I have tried what feels like dozens of combinations to get this happening, but keep failing. My best effort was a "Whole group" present trigger with This && (captive E1) && (captive E2) in the condition - but I'm not sure what will happen if there's only E1 or E2 being played. I've tried lots of things like {captive _x && faction _x == "IND_F"} forEach player, but I usually get generic error messages and such. Thoughts and problem solves welcome.
  2. BINGO! You're a genius. Worked absolutely perfectly. Thank you, thank you, thank you!
  3. Hi dchan200, I just did an experiment with say, say2D and PlaySound. say, say2D and say3D all have the issue where the sound continues on an endless loop. playSound works properly, with just one shutter sound each time you click, but the sound is not as good quality. If you find a solve for the looping sound I would love to know, but if there isn't an answer to the issue, at least I can use playSound. Once again, thanks for solving the main issue for me. I really appreciate it. You made my day! Cheers
  4. I added the line Hint "Photo taken"; after CameraUnit Say3D "Shutter"; and it successfully only fires the hint once each time you click the camera, so it definitely looks like Say3D is the issue.
  5. Okay. Thanks heaps for your help with this so far.
  6. Wow dchan200, thanks for the super fast reply! I just gave it a go, and it was almost perfect. The issue that occurs with your script is that the Camera Say3D "Shutter"; line keeps repeating after only one click of the camera, even after putting the camera away. The second part to put the camera away works great.
  7. Hi folks I've got an issue with trying to write a script that lets me keep doing an action until the point where I don't want to do the action any longer. A player has a camera in their gear. When they want to take a photo, the script fires up. The script makes them put away their current weapon, and an image of the back of a camera pops up on their screen. picture sharing Now the bit that has me stumped. I want to be able to have the player take as many photos as they want before putting the camera away. The script snippet I have for 'clicking' the camera is this: (The inputAction "Fire" is done by the player holding Left-Ctrl + Left mouse click). This works a treat in my script, but sadly can only be done once at the moment due to my lack of scripting know-how. I then have another script snippet which lets the rest of the script continue, thus closing the camera and letting the player get his weapon out again: (The inputAction "toggleRaiseWeapon" by default is a double tap of the Left-Ctrl key). The other problem here is that the player has to take a photo before the script continues on to the part where the player can put the camera away. What if the player opens the camera, but then decides to put it away without taking any shots. He/she can't in the script's current state. Here's the whole script currently: So in summery, I want the player to be able to point and 'click' the camera as many times and at as many objects as they want, then when they're ready, put the camera away. I hope that all makes sense. Any help with this is appreciated. Thanks heaps. Vapour
  8. Thanks heaps for the replies guys. Okay, this is what the issue was. Thanks to Pierre from Armaholic for spotting it. gridPos was a 'Global' variable, but only on the clients computer. That variable needs to be broadcast to all other clients (players) in the mission by using the command 'publicVariable'. Here's how it all should have looked: gridPos = mapGridPosition getPos unit1; publicVariable "gridPos"; parseText format ["<t size='1.2' align='center' color='#113DDD'>Respawn moved to grid %1", gridPos] remoteExec ["hint"];
  9. Hi fellow scripters I have 'Unit1' activating a script from an addAction. Part of the script fires a hint to tell all players on the server what the map grid reference is of the freshly moved respawn point. The unit who activated the script gets a nice "Respawn moved to grid 023865" or wherever the respawn point is, but all the other players get "Respawn moved to grid Any". Where have I gone wrong? Script snippet responsible: [[{gridPos = mapGridPosition getPos Unit1; Hint composeText [parsetext format ["<t size='1.2' align='center' color='#113DDD'>Respawn moved to grid %1", gridPos]]}],"BIS_fnc_Spawn",true] call BIS_fnc_MP;
  10. Thanks for the reply GC8! That's a handy script snippet to have around. The RPT file says: "OnActivation any" when a radio trigger is activated, so I'm guessing that means no variables being recorded by it.
  11. Hi fellow scripters In a MP mission, I have a radio trigger placed down that runs a script to shift a respawn_west marker to the location of the unit that activated the radio trigger. Normally, with an area trigger you would pass the 'unit' variable to the script by putting: nul = [thisList select 0] execVM "scriptname.sqf" in the 'ON ACTIVATION' box of the trigger, and then in the sqf file having something like: _unit = (_this select 0); What is occurring though with the radio trigger, is that it is obviously not receiving the unit's variable in the script. I get 'ERROR - UNDEFINED VARIABLE' when activating the trigger in mission. Are radio triggers a little different from area triggers in this respect? I'm assuming they either expect just one activator as opposed to many, thus may not use 'thisList', or are perhaps not recording any activator at all. I have tried nul = [this select 0] execVM "scriptname.sqf" and nul = [this] execVM "scriptname.sqf", but to no avail. Still the same error. Does any one have some bright ideas about where I may be going wrong? Any help is much appreciated.
  12. vapour

    RHS Escalation (AFRF and USAF)

    Okay, I've worked it out. For others who want the AI to para drop a vehicle from the C130J, do the following. I've got an AI controlled C130J flying around the map named "C130J_1" To add a vehicle to the cargo I've put down a vehicle in the editor and put "This AttachTo [C130J_1,[0,1,3.02]];" in it's Init (This was for the open Humvee. Position may need to altered for other vehicles). To get the AI to perform the para drop, you'll need to do it via a script. My script simply reads "[C130J_1] spawn rhs_fnc_vehPara;" I get the C130J to follow a flight path, and as it passes through a trigger on the editor, the trigger executes an SQF file I've called "CargoDrop.sqf". The sqf file contains the "[C130J_1] spawn rhs_fnc_vehPara;" line and nothing more is needed.
  13. vapour

    RHS Escalation (AFRF and USAF)

    I'm assuming it's got something to do with: spawn rhs_fnc_vehPara
  14. vapour

    RHS Escalation (AFRF and USAF)

    With the C130's ability to do a cargo drop, is it possible to get the AI to somehow perform the "Cargo Drop"? I can get a vehicle in the plane with "AttachTo" no problem, and it's able to be cargo dropped manually (by the player being in the plane), but I would like the AI to be able to do it. Anyone know if there's a script command?
  15. Hi guys. This is very cool and handy for missions. I have tried working it in to my current mission, but for some reason the intel doesn't pick up my variable. In the Intel's Init: if (isServer) then {[this,"RscAttributeDiaryRecord",["Disarm code", Format ["Reminder: The code's %1.", txtcode]]] call bis_fnc_setServerVariable; this setVariable ["recipients", west, true]}; When it is picked up, it reads "Reminder: The code's any". So instead of the variable's text string, it's just returning the word "any". I use the variable - txtcode - in other parts of the mission and it works fine, reading back to players as a text string within a hint. Any deas???
×