Jump to content

evans d [16aa]

  • Content Count

  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

12 Good

About evans d [16aa]

  • Rank
    Staff Sergeant


  • Occupation

Contact Methods

  • Biography
    Master Sergeant in USEC. Platoon Commander, 1st platoon. Unity Royal Lancers, UX-501. usecforce.com
  1. evans d [16aa]

    Help Getting AI to follow Scripted Waypoints

    Cheers for the suggestion, but they're not jumping out at all now and, frustratingly, it's not throwing an error at me so I don't have a clue where it's going wrong.
  2. Ladies and gentlemen, I'm making a nonsense mission for myself to learn some scripting and to use as a repository for any script that I may use later. Think of it as me creating a library for myself to use when I don't have internet to check scripting. I'm currently trying to code up some waypoints for some AI that I've spawned in via a script. In my testing, however, the group gets into the helicopter I specify, but when I tell them to get out they seem to suffer from an agoraphobic attack and immediately get back into the helicopter rather than the boat they're supposed to. Oddly enough, if I order them to get into the boat without getting into the helo first they don't mind at all, so the problem is clearly in waypoint 2. So: Who can see the problem? spawnSplashdown.sqf waypoint1.sqf waypoint2.sqf waypoint3.sqf Cheers chaps. P.S: Bonus points if you're able to change "GetOut" to Eject. I'm not sure what I'm doing wrong but simply changing it to "EJECT", vehicle chariot_Helo doesn't seem to work for me. EDIT: Included all scripts involved in the chain in case you can think of a neater way of doing things or if there's anything obviously wrong with the others that could be impacting this.
  3. evans d [16aa]

    Help Creating a While Loop

    Stellar! Thanks all, this is a real help.
  4. evans d [16aa]

    Help Creating a While Loop

    Can you give me a little explanation on how this works so I'm able to use this with a modicum of intelligence? I assume I need to change the variable "time" to an integer?
  5. evans d [16aa]

    Help Creating a While Loop

    Gentlemen, thank you very much. You'd sorted that out nicely for me. I'd a bit disappointed that my idea of a while loop kept flagging that error, but you've created a great workaround. Cheers again!
  6. evans d [16aa]

    Help Creating a While Loop

    Harzach, thanks for the help. Brightness actually starts at 0.3, so I edited your code to read: _br = 0.3; for "_i" from 1 to 20 do { _sub = _i / 20; insertHeliLight setLightBrightness (_br - _sub); sleep 0.1; }; The problem now is that it dims (still rather fast, but I wonder if I could change that by changing the 20s to 100s or something) but then lights back up again.
  7. evans d [16aa]

    Help Creating a While Loop

    Cheers for the help. That works, but it seems happen that little bit too quick. Do you know how you'd change it to work with sleep commands? EDIT: Perhaps it would be better if I posted the whole of my script. I've also edited my OP so the whole script is shown, rather than just the dimming bits. EDIT 2: I'm a mong. Your code DOES have a sleep command...
  8. Ladies and gentlemen, I'm trying to get a light to turn off by way of dimming so it's not a sudden binary change from on to of, and while I've got it working manually (by way of about 20 sleep commands), I feel like I should be able to do it a lot more aesthetically with a While loop. The problem is, I don't have a clue how to word it. I've just spent 5 minutes trying to type in example code that I've thought of, but the syntax just doesn't look right and I can't wrap my noggin' around it. My current method is bellow, and you can see what I mean: it's functional, but amateur, clunky and untidy. Cheers in advance for the help. - Evans EDIT 1: I've been dicking about with my script and I've come up with the following. The problem is, it still throws a generic error (missing ;) on the highlighted line(s):
  9. Cheers F2K. This'll be a great foundation!
  10. Hello all, The problem's as it sounds. I have an 8 man AI squad in Kamino on the range and I've setup a small firing range for them to practice at. I have 8 different scripts (named "kaminoRange1 through 8.sqf") with the following code: while {!blueNearKamino} do { _maxTime = 5; _minTime = 2; _sleepTime = (random (_maxTime - _minTime)) + _minTime; _target1 = [kaminoTarget1,kaminoTarget2,kaminoTarget3,kaminoTarget4,kaminoTarget5,kaminoTarget6,kaminoTarget7,kaminoTarget8] call BIS_fnc_selectRandom; sleep _sleepTime; kaminoSoldier1 doTarget _target1; sleep _sleepTime; kaminoLogic action ["useWeapon",kaminoSoldier1,kaminoSoldier1,0]; sleep 1; }; Note: The different scripts have corresponding numbers for their variables (e.g: kaminoSoldier2, _target4, etc) The problem with this is that, while it works, it looks ugly having essentially the same script called 8 times (nul = execVM "scripts\kaminoRange1.sqf; nul = execVM "scripts\kaminoRange2.sqf; nul = execVM "scripts\kaminoRange3.sqf; etc") What I'd like to do is condense those 8 scripts into 1. I've tried using the good old boolean "&&" method: while {x} do { code1; }; && { code2; }; But that doesn't work. I then tried the following method: while {x} do { { code1 }; { code2 }; }; but that doesn't work either. I then tried to make functions to solve the problem and then referencing them in the loop: while {x} do { call function1; call function2; }; And while this kind of works, it waits to cycle through each function before getting to the next one (it waits for function 1 to finish, complete with sleeps, before moving to function 2). Simply making lots of loops: while {x} do { code1 }; while {x} do { code2 }; Only fires code1, and doesn't move onto code2. Can anyone think of a way to make this code work simultaneously?
  11. evans d [16aa]

    Adjust height of smoke module?

    Perhaps try using the setPos command? this setPos [getPos this select 0, getPos this select 1,7]; When placed in the init of the smoke, that should place it 7 meters in the air.
  12. evans d [16aa]

    British Military Beret Mod

    If you're taking requests, add in a beret for the Mob (Royal Navy). If the Crabs get one so do we!
  13. evans d [16aa]

    Light up HQ building

    As a quick heads up to the OP: this essentially creates a lightbulb. You'll need to position the sphere into the right place.
  14. evans d [16aa]

    Popping Smoke in Approximate Area via Script

    Well, gentlemen, thank you for your time but I've gone with a much longer version of the script I wanted... one with 14 if statements... Many thanks again, people. EDIT: As a quick note, here's my script now. I don't know why I was trying to over complicate this in the first place. I feel rather foolish... spawnDMRSmoke.sqf: // initialize with // this addAction ["Target Hint", "scripts\Actions\spawnDMRSmoke.sqf","",0]; DMRTargets = [T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14]; { if ( ( _x animationPhase "terc" ) <= 0) then { _posX = position _x; _pX = _posX select 0; _pY = _posX select 1; _dX = (random 30) - 15; _dY = (random 30) - 15; _pX = _pX + _dX; _pY = _pY + _dY; _bum = "smokeShellPurple" createVehicle [_pX,_pY,125]; }; } forEach DMRTargets; NOTE: This script is intended for use with targets that will stay down once shot.
  15. evans d [16aa]

    Popping Smoke in Approximate Area via Script

    The problem is that that script wont (I believe) spawn smoke grenades on the positions of the taregts that are still up. I think I'm sorrect in saying that the _this select 0; means that it will only reference the target that was hit and that doesn't need a smoke spawned on it. This brings us back to the problem of removing a target from an array and then referencing that array later to spawn the smoke, but the if statement doesn't like arrays meaning that everything's fucking up again.