Jump to content

Fuzzy Bandit

Member
  • Content Count

    371
  • Joined

  • Last visited

  • Medals

Everything posted by Fuzzy Bandit

  1. Add this to your respawn script: unit setVehicleInit "blah blah blah"; processInitCommands;
  2. Myke's code looks quite promising. I've just been testing: hintSilent "Moving to deck_spawn..."; sleep 2; _unitArray = crew rhib_1; _units = (_unitArray select 4); { _x action ["eject", rhib_1]; _x setPos (getPos deck_spawn); _x setDir 180; } forEach _units; But have had no luck so far. Hopefully Myke's code works.
  3. In your unit's initialisation line, put the following: this addEventHandler ["killed", { [this] execVM "respawn.sqf"; }; Now, the file 'respawn.sqf' will contain the following code: _unit = (_this select 0) select 0; _weapons = (_this select 1) select 0; _magazines = (_this select 1) select 1; waituntil {alive player}; _unit = player; removeallweapons _unit; {_unit addmagazine _x} foreach _magazines; {_unit addweapon _x} foreach _weapons; I think you'll have to re-synchronise the unit to the module upon respawning. You could place this inside our previously-created 'respawn.sqf', but I'm not totally sure on how to do it. Look up synchronising with code. I'm not too experienced with briefings or objectives, so I can't really help you with that. To stop JIP you could Lock the server. That should be available in the 'Server Control' dialogue, accessed from the Map. In each unit's 'Insert Unit' dialogue are the two settings below. These can add a nice amount of randomness in missions without going too much into complicated coding. It can change the amount of troops which spawn and where they do. Probability of Presence Placement Radius Hopefully that helped.
  4. Moving them out of a vehicle using setPos? Wasn't aware you could do that! So just to clarify, let's say the unit in inside a cargo slot on a RHIB boat named 'vehicle'. You want to move him out of his cargo seat and place him in the same location, but above the sea at the level of the object named 'deck_spawn'. You then want to set that unit to face south. I'm admittedly a bit confused as to what for! :D Are you trying to allow the unit to fire whilst inside a cargo slot of the boat? Could you let me in on the intentions of the code? If you're worried that I'll steal you amazing idea, don't worry - I do exactly the same thing. PM me if you like! Cheers.
  5. Fuzzy Bandit

    Script Help

    Well, I probably won't be of much help, but here goes... First Question: I'm not totally sure as I haven't done it for a looong time! Might be something along the lines of: Delta = group this; Second Question: Creating groups is not one of my fortes. I absolutely hate it, and there's always something I'm doing wrong! Anyway, here's a script somebody posted to me on an unrelated problem, but it might help you out. I can adapt it a little bit if you tell me what you want. Third Question: You could try it with variables. Let's say we have a group of soldiers. Assuming a random amount have spawned, we'll first create a variable which manages how many units are in the group led by 'man1' to begin with: _howMany = count [units group man1]; We'll then create a variable which keeps up-to-date with how many units are alive. While {true} do { _howManyLeft = count [units group man1]; }; Next, in our trigger, we'll set the condition to: _howManyLeft <= (_howMany / 4) And finally, in the Activation of our trigger we'll call the enemy spawn script. nul = [<"GroupName">,<"Spawn">,<"Wp1">,<"Wp2">] execvm "spawn.sqf"; Like I said, I can adapt and explain the spawn script to you if you like. Hopefully that helped a bit. The scripting looks complicated but is really just utilising a few commands. I use the Wiki a lot. It helps with a lot of things. A LOT of things.
  6. I'm assuming you've tried 'cargo', e.g.: moveInCargo directly relates to cargo Failing that and looking at the Wiki I understand what you mean, but not totally sure what you'd need it for! :D What are you trying to do? I guess you're trying to apply whatever piece of code to all units inside the cargo bay of a vehicle? If so, maybe something like: { _x action ["eject", vehicle]; } forEach units inCargo vehicle; Just stabbing in the dark here really. If 'inCargo' is correct, that should eject all units inside the cargo bay of the vehicle named... yep... vehicle.
  7. Looks good to me. Is there any way I would be able to apply individual commands to each gun upon creation, though? There's no pattern to the commands, so the best I can do at the moment is a For loop and a Switch statement. Using that method would clear things up, but it doesn't solve the issue of having to apply different commands to each gun, as it would seem that they are immediately added to the array upon creation, and them having no 'name' presents me with quite an issue! I was going to write some code I thought might've worked with the array, but upon writing it I ended up just defining loads of variables again. I also see that you've used the command 'exitWith' in that piece of code. Sound incredibly useful to me! I'm guessing it executes the code inside the '{}'s before terminating the script? If so, it'd help me loads! If not, how exactly does it work? Cheers!
  8. I actually think I remember asking a question along these lines a while back. The issue was that, yes, most of the time you just die. I wanted to make it (like in norrin's Revive Script) so that every time you are shot (and 'killed'), you go into an unconscious state, waiting to be revived. Using the ACE Wounds System, 9 times of out 10 you will just die. But every now and again you'll go into an indefinite unconscious state. Your find on that line of code is priceless. It's exactly what I was trying to achieve in one of my past threads, but it remained unanswered. I'd slap that line of code into your first post, as it really is a priceless find. Where on earth did you come across it?
  9. To begin with, yes, this script in intended as a 'respawn' script. There's more happening than just the creation of the vehicles and it would seem that without globally defining each with their own separate name, some of those things are possible. The reason I needed them all to have their own separate names is because there is a separate script (run from the player) which attempts to board 'opgun1'. If 'opgun1' is occupied, the script will try to board 'opgun2'. This is done from within a For loop. Now, when creating a vehicle I know that it immediately gives that vehicle a name depending on the text before (highlighted in red below). [color="Red"]vehicle[/color] = "typeOfVehicle" createVehicle position; The issue is that if I then attempted to call the name of a player inside that vehicle (e.g. priority would be the Gunner when talking about artillery pieces) using the code: if ((vehicle emptyPositions "Gunner") < 1) then { hint format ["vehicle is occupied by:\n%1", name vehicle]; }; The hint would display: vehicle is occupied by: Error: No Vehicle Currently, in certain terms, a 'number' is applied to each gun, labelling it. Depending on the gun's 'number', different commands are issued using a switch statement. At the moment, and maybe unfortunately on my part, there's a global variable which states how many guns are currently occupied. I use this variable to help determine which gun to board upon using my 1 action assigned to the player. Let's say there are 14 guns lying around in a field. 7 are occupied and 7 are not. The player then uses an action assigned to them labelled 'Board Gun'. This will execute the following script (assuming opGunCount = 14): boardgun.sqf _c = 1; _going = 1; While {_going == 1} do { for "_c" from 1 to opGunCount do { _gun = call compile format ["opgun%1", _c]; if ((_gun emptyPositions "Gunner") > 0) then { player moveInGunner _gun; _going = 0; }; }; _going = 0; }; That, in theory (I do not have access to the actual script at this time), should find the first empty slot within the 14 guns and put the player into it. If you could tell me how to do that using one multi-dimensional array then I'd be more than happy to change it and cut down on code. The issue is that I'm just not sure if it's possible. You've brought this up before, and I'll say again - I'm really not afraid of arrays. They're wonderful things and I'd prefer to use one, it's just that I'm not totally sure of how I would incorporate an array into my code and get the same functionality. Thanks for the help everyone, and thank you for your input ruebe. Is there any way I would be able to incorporate an array into my code? Cheers.
  10. Once again, adapted, tested and working perfectly. Thanks you two! Also thanks for the slight correction with the "for" loop. I never knew you could do it like that - saves a bit of tom-foolery! :P
  11. Just tested your code as well Rommel - that works a charm as well, though you forgot 'format' in the 3rd line. :P ---------- Post added at 16:41 ---------- Previous post was at 16:40 ---------- The script can and most probably will be run more than once, but never at the same time. As well as that, before the vehicles are created, the 'old' vehicles with the same name are erased, making way for the new ones. So which one is faster? Rommel's or alef's? :D
  12. alef - adapted, tested and working perfectly! Can you run through exactly what is happening in the segment of code? I'm not too familiar with missionNameSpace.
  13. mcvittees - I've tried code very similar to that. I wrote some quick debug code which gives me the name of the vehicle I'm currently in. With the current two methods (mine and yours), if I create the vehicles, get in them and use the debug code, it shows the name of the vehicle correctly as 'opgun1', 'opgun2' etc. The issue is that they don't seem to be making themselves available to the server. If I then use the code: if ((opgun1 emptyPositions "Gunner") < 1) then { hint format ["opgun1 is occupied by:\n%1", (name opgun1)]; }; I then get the error: ERROR: No Vehicle. Trying your method now alef.
  14. I know this is quite an old thread, but this may still be of use to it's author. This was a method I was made aware of a while back. So to make an object called 'vehicle1' burn indefinitely with a large fire, I would set a trigger up with: Condition: getDammage vehicle1 > 0.99 [*]Activation: nil = [vehicle1, 10, time, false, false];
  15. Well, when I make any missions I create them in the Multiplayer Editor (even Single-Player missions). The multiplayer editor can be accessed by going to Multiplayer New Create Server (Ok)* New - Editor *I just create a LAN server with all the default settings. You can also create an internet server is you would like to test with friends. Then, when I want to preview, instead of just clicking 'Preview', save it as a User Mission, then (using the Save dialogue again) Export to Multiplayer Missions. I then proceed to exit out the editor, select my Mission from the list and click OK to start playing it. From there you can set difficulty and anything else you would want. As a quick note, the 'Editor' version of your mission appears in BLUE, and the Exported version of your mission appears in the normal text colour (beigey...). In terms of Situational Awareness - to improve it, move slow and constantly check all around you. Because ARMA's a game, it's very easy to want to run everywhere and get to your next objective as quickly as possible. If you watch the AI move from point A to B in 'Stealth' mode, you'll see that the Fire-Team moves one at a time whilst the rest of the team covers. They stay mostly prone or crouched the whole time, and spend 90% of their time simply looking for enemies!
  16. That works for me...
  17. I see. As JW Custom says, if you want them to Black Out when hit, just put the 'ACE - Enable Wounding System' Module in the editor. The code I gave you makes a unit black out, useful for if you want save an unconscious pilot or something. Using the Wounding System and getting hit will make you black out indefinitely. You can wait for friendly forces to come and heal you, or you can press ESC and select 'Respawn' to respawn.
  18. [unitname, time] call ace_blackoutall;
  19. Here's a list of the FSMs in ace_sys_goggles.pbo in the ACE Addon Folder: use_earplug.fsm use_glasses.fsm remove_earplug.fsm remove_glasses.fsm So, to add the glasses you should be able to use: [player] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm;
  20. This is what you need to do: Triggers: Activation Trigger which activates when the BLUFOR infantry arrive Infantry Waypoints: "GET IN" Waypoint located inside the trigger area Helicopter Waypoints: "MOVE" Waypoint RIGHT next to where it starts "LOAD" waypoint inside the trigger area Next, using the Synchronise Tool, drag a line between the Trigger and the Helicopter's "MOVE" waypoint. This will make it so that only when both the "MOVE" waypoint and the trigger have been activated, the helicopter will move onto the next waypoint. By placing the "MOVE" waypoint right next to where the helicopter starts we make sure that that waypoint is immediately activated. We then wait for the trigger to be activated. When it is, the Helicopter will move in for extraction.
  21. Fuzzy Bandit

    Stop time changes

    Ok, so five minutes = 5 x 60 = 300 seconds. So, you could create a file called init.sqf and place the following code in it: While {(true)} do { sleep 300; skipTime -300; };
  22. I don't think so. :P Not totally sure though - might be something somewhere...
  23. Fuzzy Bandit

    Campaign ideas...

    Nevermind.
  24. Well to be able to use them you'll need to edit your ACE config file. It can be found in your Main ARMA directory > userconfig > ACE > ace_clientside_config.hpp. Edit it with Notepad or whatever you use, and find the part which states: /*////////////////////////////////////////////// //CONFIG SETTING FOR : ACE 2 MOD - Changeable glasses ingame //-------------------- //FEATURES: Lets you choose different glasses //--------- //TO ENABLE: Please ADD your Player Profile Name //---------- //EXAMPLE: //-------- //class Identity //{ // name = "John Doe"; //}; // // // // ////////--E D I T below THIS LINE--//////////*/ class Identity { name = "Taxi 1"; }; /*////////////////////////////////////////////// Where it says "Edit Below this Line", put your EXACT in-game name in the speech marks. Mine, as you can see, says Taxi 1. After doing that (and remember to save!) you'll be able to equip the items in-game by just using the Action-Menu (scroll wheel). I'm not sure there's a command to automatically equip the items from the beginning of the game though.
  25. Fuzzy Bandit

    triggers

    Make a trigger with the Condition: !alive unitx
×