Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. Well done that you got it working. That's a huge amount of code! Look in the spoiler for code that will place any number (144 limit) of squads in any buildings with positions...on any island. You might be able to get ideas from it. Feel free to hack and chop as you see fit. It's well commented... so should be easy enough to follow. Note: This is not posted in order to "rain on your parade"... but to try to help you in the future.
  2. I don't think that will work for vehicles with multiple turrets. Try it on a UH 60-M chopper for instance.
  3. Agreed....you'd think there would be!
  4. I've been looking at it.... and if sxp2high's code above doesn't work as you'd like.... then it gets more complicated with turrets, weapons, magazines etc. EDIT: There's no command to get ammo amount from 0 to 1 as far as I know.... if you want to transfer the vehicles ammo to the respawned vehicle....that's when it gets messy!
  5. Hope it works for you... Just to let you know...I just made a change to the code....probably since you've read it. I had a variable name that was wrong.
  6. Try this mate.... Add this to the init of the leaders of the baddies groups. MakeBaddiesHostile = false; nul = [group this] execVM "test.sqf"; Create a script in your mission folder called test.sqf or whatever you want... and put this in it.... test.sqf:- _group = _this select 0; {_x setcaptive true} foreach units _group; waituntil {MakeBaddiesHostile}; {_x setcaptive false} foreach units _group; At the waypoint where you want the choppers to start attacking the baddies put this in the On Act. MakeBaddiesHostile = true; ******** For this part the helos must have names. If the helos are in the same group...this will delete them when they reach the waypoint. Put it in the waypoint's On Act. {deletevehicle _x} foreach crew [b]helo1[/b]; deletevehicle [b]helo1[/b];{deletevehicle _x} foreach crew [b]helo2[/b]; deletevehicle [b]helo2[/b]; If they are not in the same group.....well.... I'm sure you'll figure that out! Hope that helps. EDIT: The way this will work is the baddies will shoot at the choppers but the choppers won't shoot at the baddies until MakeBaddiesHostile = true
  7. twirly

    ARMA 2: OA beta build 84580

    Well said.... and exactly the same thoughts here.
  8. Found a copy in my downloaded scripts. Uploaded it here for you at Mediafire.
  9. .....sorry mate couldn't resist! I don't think you can get music to play in the briefing. Have a look at this post.... http://forums.bistudio.com/showthread.php?t=112376 I also tried and it only plays after you leave the briefing. Maybe there's some trick to it.... if it is in fact possible!
  10. Windows Media Player :D
  11. It seems the eject action doesn't work on dead units....so DAP is correct with using setpos instead of eject. Don't know much about Warfare.... but somehow you have to find where the vehicle is created in the code and modify it. Run the script with:- nul = [[b]_vehicle_created_by_warfare[/b]] execVM "eject.sqf"; eject.sqf:- private ["_veh","_run","_crew"]; _veh = _this select 0; _run = true; while {_run} do { _crew = crew _veh; if ({alive _x} count (crew _veh) == 0) then { {_x setpos getpos _veh} foreach crew _veh; _run =false; }; sleep 1; }; The above code runs until everyone in the vehicle is dead and then exits....this (below) will run as long as the vehicle is alive. eject.sqf:- private ["_veh","_crew"]; _veh = _this select 0; while {alive _veh} do { _crew = crew _veh; if ({alive _x} count (crew _veh) == 0) then { {_x setpos getpos _veh} foreach crew _veh; }; sleep 1; };
  12. Hi mate... Where are you putting that code?
  13. Glad it helped. Yeah I fixed the _rNumber thing in the post above.
  14. Your first attempt might have worked with this instead of _this if it was placed in the ammobox's init. But try it this way... Create a little script and call the script from the ammobox's init....instead of trying to cram a bunch of text in the init. Create a script in your mission folder called fillammobox.sqf or whatever you want to call it. fillammobox.sqf _ammobox = _this select 0; while {alive _ammobox} do { //clear the ammo box clearweaponcargo _ammobox; clearmagazinecargo _ammobox; //create a random number _rNumber = ceil (random 10); //add _rNumber * 10 magazines....so 10 for each gun _ammobox addMagazineCargo ["20Rnd_556x45_Stanag",_rNumber * 10]; //add _rNumber weapons to the box _ammobox addWeaponCargo ["m16a4",_rNumber]; sleep 8800; } Put this in the ammoboxes init:- nul = [this] execVM "fillammobox.sqf"; That will run the little script instead of struggling with the space in the init.
  15. Great island.....and great work.... thanks!
  16. twirly

    MBG_Killhouses

    Thanks for this.
  17. twirly

    MBG Cindercity

    Great work...thanks.
  18. The answer is no...... for the same reason described above by F2kSel. Oops...ninja'd. It would work if the vehicle names were not strings.
  19. Haha... yeah. I have no idea what I was thinking. I copied and pasted from the comment section at the top of the script which was also "unfinished". Thanks for the heads up. Post above fixed.
  20. Back! :) I see Celery posted a good script there... but was working on this so thought I might as well get it on here. This script will keep you alive (invincible) in any vehicle. Once the vehicle is destroyed you will be ejected. If you end up in chute you will stay invincible until 5 seconds after you reach the ground. If you are in a ground vehicle....you will stay invincible for 5 seconds after you are ejected. superdriver.sqf /* superdriver.sqf - twirly 11th Sept 2011 Execute from init.sqf or players init Execute with: nul = [] execVM "superdriver.sqf"; Works with any vehicle and not limited to the driver/pilot */ private ["_veh"]; TWIRL_SuperDrvrEHset = false; while {true} do { if (vehicle player != player) then { _veh = vehicle player; if (not TWIRL_SuperDrvrEHset) then { //hint "EH added"; //sleep 1; vehicle player addEventHandler ["Hit",{nul = [_this select 0] spawn { private ["_veh"]; _veh = _this select 0; if (not (canmove _veh) or not (alive _veh) and (vehicle player) != player) then { _veh removeAllEventHandlers "Hit"; player action ["EJECT", _veh]; }; }; } ]; player addEventHandler ["handleDamage", {false}]; titleText ["Invincibility ON","plain down"]; TWIRL_SuperDrvrEHset = true; }; } else { if (vehicle player == player and TWIRL_SuperDrvrEHset) then { waituntil {getpos player select 2 < 1}; sleep 5; player addEventHandler ["handleDamage", {true}]; _veh removeAllEventHandlers "Hit"; titleText ["Invincibility OFF","plain down"]; TWIRL_SuperDrvrEHset = false; }; }; sleep 1; }; Execute from init.sqf or players init with:- nul = [] execVM "superdriver.sqf"; EDIT: Code updated.
  21. The good news outweighs the bad news..... wicked! Good going guys.
  22. Any unit you Teamswitch into an then out of.... goes brain dead. The unit will have to be ordered to do something again before it will do anything. Not an ideal way for things to work... but that's how it seems to be. Don't know anything about loading saved games.....but the behaviour after loading is probably something similar to the Teamswitch problem.
  23. It's really important that you get your head around arrays....you're going to be needing them a lot!
  24. I just tested with a Harrier and a C-130 and it didn't work. Hmmm.... will have to do some fiddling and get back! ...maybe add an EventHandler to deal with damage.
  25. @tavtavtav..... it should work because I tested it in a helicopter and got ejected when the vehicle was hit and could no longer fly! @psvialli.... maybe something like this....change the sleep to whatever you need. while {true} do { if (vehicle player != player) then { player allowdamage false; if (not (canmove vehicle player)) then { UnAssignVehicle player; player action ["EJECT", vehicle player]; [b][color="Red"]waituntil {getpos player select 2 < 1}; sleep 5;[/color][/b] player allowdamage true; }; }; sleep 1; };
×