Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. There is a Arma hemp plant addon that works. Search Armaholic. I think that's where it was.
  2. Try... Empty/Objects/VeryWeird/Superglue .....or maybe the donotFallOff command might work there! ;)
  3. It might be a good idea to tell us all what you found out!! It just might help someone else.
  4. twirly

    Demolition

    There is a claymore in JTD Mines which can be found at... http://www.armaholic.com/page.php?id=9702 ...if that is of any help.
  5. Not tested...but should work. Should delete everyone but the Pilot/Driver. _crew = group _vehicle; for [{_j=0},{_j<count units _crew},{_j=_j+1}] do { _dude = units _crew select _j; _rolearray = assignedVehicleRole _dude; if ((_rolearray select 0) != "Driver") then { deleteVehicle _dude; }; sleep 0.01; };
  6. Use assignAsCargo first! _soldier1 assignAsCargo _truck; _soldier1 moveInCargo _truck;
  7. Ah...Ok...cool. That should work fine then!
  8. I'm a little lost why you want to do this but in the editor placed trigger you would set a variable to true if the trigger was tripped....and then check for that variable being true in the scripted trigger. Create a variable called trig1_fired and set it's value to true in the editor placed trigger when the trigger is fired. Then in the scripted trigger check to see if trig1_fired is true. The code for the scripted trigger would be along these lines. This creates purple smoke at the triggers position:- trig2 = createTrigger["EmptyDetector", getPos player]; trig2 setTriggerType "NONE"; trig2 setTriggerArea[10,10,0, true]; trig2 setTriggerActivation["NONE", "PRESENT", false]; trig2 setTriggerStatements ["[b]trig1_fired[/b]", "smoke = 'SmokeShellPurple' createVehicle (getPos trig2);", ""]; createTrigger and it's associated commands are here. Experiment with the code and see what happens.
  9. I used the scripted trigger because I didn't know how to get the dimensions of a trigger....I'm not sure if you can! But you can get the dimensions of a marker.....and then create a trigger on top of the marker with same x and y dimensions and angle. I agree it would be better/easier if we could just get the shape and angle of the trigger itself. You can always make the marker invisible with setMarkerAlpha.
  10. twirly

    Simple CountDown script

    Just use Mykes script from post 3....it works fine in SP as well.
  11. :) ... sorry mate I didn't understand your problem....but I think I've got it for you now. Demo here. This works with a rectangular marker. It will create a trigger at the same position and of the same shape as the marker. The marker is named "mkr_impact" in this example. The code in the int.sqf below can be called from the marker itself. init.sqf nul = ["mkr_impact"] execVM "init_mortar.sqf"; init_mortar.sqf private ["_mkr","_mkrdir","_mkrx","_mkry","_trig"]; _mkr = _this select 0; _mkrdir = (markerDir _mkr) mod 360; _mkrx = (getmarkerSize _mkr) select 0; _mkry = (getmarkerSize _mkr) select 1; _trig = createTrigger["EmptyDetector", getMarkerPos _mkr]; _trig setTriggerType "NONE"; _trig setTriggerArea[_mkrx, _mkry, _mkrdir, true]; _trig setTriggerActivation["EAST", "PRESENT", false]; _trig setTriggerStatements ["this", "nul = ['mkr_impact',8,3] execVM 'randmort.sqf'", ""]; randmort.sqf private ["_mkr","_rounds","_del","_height","_ammo","_xy","_pos","_mkrposx","_mkrposy","_i","_bomb"]; _mkr = _this select 0; _rounds = _this select 1; _del = _this select 2; _getmkrxy = { private ["_mkr","_mkrdir","_mkrx","_mkry","_x1","_y1","_rotx","_roty"]; _mkr = _this select 0; _mkrdir = markerDir _mkr; _mkrx = (getmarkerSize _mkr) select 0; _mkry = (getmarkerSize _mkr) select 1; _x1 = (0-(_mkrx/2)) + random _mkrx; _y1 = (0-(_mkry/2)) + random _mkry; _rotx = _x1 * cos (_mkrdir) - _y1 * sin (_mkrdir); _roty = _x1 * sin (_mkrdir) + _y1 * cos (_mkrdir); [_rotx,_roty] }; _height = 30;// increase this if you want the items to fall from the sky. _ammo = "grenade";// Ammo can be changed for larger effects. _xy = []; _pos = []; _mkrposx = (getMarkerPos _mkr) select 0; _mkrposy = (getMarkerPos _mkr) select 1; for [{_i = 0},{_i < _rounds},{_i = _i + 1}] do { _xy = [_mkr] call _getmkrxy; _pos = [_mkrposx + (_xy select 0),_mkrposy + (_xy select 1),_height]; _bomb = _ammo createVehicle _pos; playsound "mortarwhizz"; sleep (random _del)+0.5;// minimum delay 0.5, adjust for best results. }; I already see different ways to do this... but as it is...it works and I hope it helps you.
  12. In the editor double click on the trigger and set axis a to 300 and axis b to 100. Select Rectangle instead of Ellipse....set the Angle if you need to and you should be good to go. You should really figure out how things work in the editor first before you move on to scripting! :)
  13. This might help you.... http://community.bistudio.com/wiki/isFlatEmpty
  14. Started out with the C64 basic and assembler. Then C128...then got involved with writing RPN stuff for the HP 41-CV and CX's. Then on to AutoCAD and AutoLISP. (Lost In Stupid Parentheses). Was interested in Apache and Perl for a long time as a hobby. Wrote GPS moving map stuff for myself using VB quite some years ago before all these GPS units hit the scene. That ended up being around 30,000 lines of code and kept me busy for a while. Discovered OFP back in 2001 I think it was and have loved and followed it ever since. It's how I get my fix! Learned this by looking at other peoples code and many, many hours of reading forums. It was truly not easy. Maybe that's what makes it fun!
  15. Hi...I had a quick play with this and I will try to help. A little quick demo is here. You need the whizz sound you want to use in .ogg format. Audacity can help you convert a .wav file to .ogg if you don't already have one. Create a folder in your mission folder called sounds...put the sound file in there. Create a description.ext in your mission folder and add this to it. decription.ext class CfgSounds { sounds[]= {mortarwhizz}; class mortarwhizz { name = "mortarwhizz"; sound[] = {\sounds\mortarwhizz.ogg, 1, 1.0}; titles[] = {}; }; }; Below I have inserted the line needed to play the sound....and increased the height for the round so that the sound gets time to play before impact. I simply chose 50m. Using playsound the sound will not be directional...this may or may not be a problem for you. yourscript.sqf // /////////////////////////////////////////////////////////////// // 1. Center place an object ot gamelogic where you want the explosions. // 2. Choose the size of the area in metere. // 3. Select how many explosions you require // 4. Select the maximum delay between explosions in seconds. // 5. minimum delay is 0.5 secs and can be changed in the script. // 6. If the two // are removed from the "Grenadebase" line a more visible marke is left on the ground. // 7."HelicopterExploSmall" "HelicopterExploBig" "SmallSecondary" _pos = _this select 0; _area = _this select 1; _rounds = _this select 2; _del = _this select 3; _height = [b]50[/b];// increase this if you want the items to fall from the sky. _ammo = "grenade";// Ammo can be changed for larger effects. for [{_i = 0},{_i < _rounds},{_i = _i + 1}] do { _newpos = GetPos _pos; _posX = _newpos select 0; _posY = _newpos select 1; _bomb = _ammo createVehicle[(_posX + random _area)-_area/2, (_posY + random _area)-_area/2,_height]; [b]playsound "mortarwhizz";[/b] // _bomb = "GrenadeBase" createVehicle [(getpos _bomb select 0),(getpos _bomb select 1),-10]; sleep (random _del)+0.5;// minimum delay 0.5, adjust for best results. }; Hope that helps you mate. :) Edit: I had not answered the trigger part of your question so I updated the demo to include a trigger!
  16. twirly

    Spawning and hight

    This is will create an "AH1Z" at 200 metres.... but it will fall out of the sky. _heli = "AH1Z" createVehicle ((getMarkerPos "hspawn") select 0,(getMarkerPos "hspawn") select 1,200); For aircraft you need to create them already flying with crew. Have a look at the links below. BIS Functions BIS_fnc_spawnVehicle Hope that helps you.
  17. I think this works for me for both spawned and placed AI. Well I'm almost sure it does :). The AI to which it's applied seem to miss like hell. With the enemy AI that at least gives me a chance to know who's shooting at me. Not sure how other settings affect these though. _dude setskill ["aimingAccuracy",0.15]; _dude setskill ["spotDistance",0.85]; _dude setskill ["spotTime",0.85]; _dude setskill ["courage",0.85]; _dude setskill ["commanding",0.85]; _dude setskill ["aimingShake",0.15]; _dude setskill ["aimingSpeed",0.65];
  18. Interesting....so I had a go. I tried changing the player to a switchable Sniper then deleting the player. Then setpos the Sniper to the players location....but nothing happens when I try to delete the player. Seems the player has to die first.....then be deleted and quickly respawn in the same position as a Sniper. createUnit addSwitchableUnit deleteVehicle selectplayer
  19. Ther's also join. You may need to to "join" him to the group. Something like this for example:- _unit = _grp createUnit [_recruit, position player, [], 10, "FORM"]; [_unit] join _grp;
  20. I think I ran into this problem before. You have to re-use the group names....when a group is wiped out and respawns it has to respawn with the same group name. Dont' have time right now to try to understand the code....but I think that might be the problem.
  21. twirly

    Pop up targets Script

    You can find info on SideChat here in the wiki. _soldierOne sideChat "Show this text";
  22. Great job! Very usefull for perpetual missions.
  23. @F2k ....Thanks for that. I needed it also. I was searching for it. Maybe this time it will stick in my friggin' head.
  24. No soldiers will spawn if a soldier of that side does not already exist. Maybe that's your problem? If that is your problem.....place an EAST soldier on the map and delete it right away by placing "deleteVehicle this" in the units init. Edit:- ...also what's going on here in this position array? _leader = group1 createUnit ["TK_Soldier_SL_EP1", [(getMarkerPos "Squad1") select 0,(getMarkerPos "pawn1") select 1,0], [], 3, "FORM"]; The x position comes from marker "Squad1" and the y position comes from "pawn1".....is this intentional?
  25. Hi...do you have -showScriptErrors added to your games shortcut? ...and what does it say in the RPT file? Both of these will help you bigtime. I suggest the next time you post code to use the code tags...your post is very difficult to read and a lot of people might ignore it because of that!
×