BLSmith2112 0 Posted March 14, 2007 What can one do to make an aircraft literally explode in mid-air? Anything simple? Or does it all have to be scripted etc? I wouldn't know how to do any of that old nonsense If I had to guess it would be something along the lines of a sabot or bomb hitting the aircraft. (I'm using this for another one of my videos. I don't know what I'm going to call it yet. Perhaps base attack 3 ) Share this post Link to post Share on other sites
nuxil 2 Posted March 14, 2007 i do this to make a mid air explotion,, i use it in my AA script _obj="Bomb" createVehicle [0,0,0]; _Anade="Sh_120_SABOT" createVehicle [0,0,0]; _obj setpos [(getPos _unit select 0),(getPos _unit select 1) ,(getpos _unit select 2) -0.1]; _Anade setpos [(getPos _unit select 0),(getPos _unit select 1) ,( getpos _unit select 2) +0.1]; Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 14, 2007 could you be just a little more descriptive? I'm sorry I haven't understood scripting too well in 5 years, compared to those who understood it all in 5 minutes. Share this post Link to post Share on other sites
nuxil 2 Posted March 14, 2007 Well you what you can do is.. make a trigger where you want the plain to explode. // think its thislist since its a trigger.. im confused myself about it. other wize try with [this] then put "on act:" blowup=[thislist] execvm "blowup.sqf" the script may look like : _unit = (this select 0); _obj="Bomb" createVehicle [0,0,0]; _Anade="Sh_120_SABOT" createVehicle [0,0,0]; _obj setpos [(getPos _unit select 0),(getPos _unit select 1) ,(getpos _unit select 2) -0.1]; _Anade setpos [(getPos _unit select 0),(getPos _unit select 1) ,( getpos _unit select 2) +0.1]; save this bowup.sqf file in your mission folder Share this post Link to post Share on other sites
nuxil 2 Posted March 14, 2007 but have you tryed something as simple as on act: { _x setdammage 1;}foreach thislist in a trigger ? it would surly bring down your plain! ps. if the trigger area is small and you are having a su34 flying verry fast by it,, it would not be registrert by the trigger,, Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 14, 2007 Nothing is working.. I've never seen a script layout like that before... the {____}'s, and the "thislist"'s.. and _x's... .sqf files...Never seen that stuff before. Now I have seen: .sqs files (unit) setdammage 1.0 I'm sorry but your previous posts I cannot follow based from years of seeing scripts written in a completely different format. This is what I tried to do... In triggers "On Act" field I typed: Unit1 exec "Bomb.sqs" The Bomb.sqs file inside the saved mission folder is: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit = (this select 0); _obj="Bomb" createVehicle [0,0,0]; _Anade="Sh_120_SABOT" createVehicle [0,0,0]; _obj setpos [(getPos _unit select 0),(getPos _unit select 1) ,(getpos _unit select 2) -0.1]; _Anade setpos [(getPos _unit select 0),(getPos _unit select 1) ,( getpos _unit select 2) +0.1]; Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 you named it sqs.. this was sqf style.. and try execute it like { _x execvm "blowup.sqf" } foreach thislist on the activation feald on the trigger, or just put as a said earlyer,. { _x setdammage 1} foreach thislist http://community.bistudio.com/wiki/trigger Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 I've looked at that and read the entire thing.. Not to say I can remember any of that.. I've read (no kidding 300 pages of tutorials in the past).. and gave up trying to 'relearn' scripting.. I just want a simple script that blows up every aircraft that trys to go through it. I've played OFP over 5 years and I had scripts that did it no problem. Now that the game is uninstalled, I don't have my handy backup scripts. Nore have I ever seen "execvm".. Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 I'll try to fix it up. (Needa minute) Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 ok i just check,, name the heli or plain.. give it a name example testpilot.. then on the trigger put, var=[testpilot] execvm "blowup.sqf" ps.. unit = (this select 0); should be _unit = (this select 0); Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 Alright I'm starting to get angry.. at this... its not you its just me trying to understand what you are saying.. I don't understand wtf "thislist" is.. I've never seen .sqf files before, I don't know my ass from my head in programming, I don't know what calls/functions/parameters/definitions/variables/declarations are.. I dont know anything. The unit name: BOB1 The "On Activation" Field inside of trigger: http://img83.imageshack.us/img83/6540/untitledyc4.jpg I don't think ArmA will accept anything called "EXECVM"... whatever that is. The script: http://img145.imageshack.us/img145/8562/untitledio3.jpg Don't work.. tried deleting units names.. and hoping the word "this" would replace it and just distroy every plane that came inside the trigger.. didn't do it Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 I see you edited your post. I'll check it out Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted March 15, 2007 Veeektor--SQF is just a more streamlined version of SQS. execVM is used to exec an SQF script whereas exec is used to do the same for SQS. When you put that in the mission editor, you need to put a dummy variable to make the parser happy. (the thing that gives you errors when you screw up) I.e. var = [thislist select 0] execVM "scipt.sqf" When something triggers a list, then thislist means whatever is in the trigger that activated it. Say, a plane named Plan1 is grouped to a trigger. When the plane hits the trigger, thislist select 0 is the same as Plane1. Thislist would literally look like an array like so: [plane1] Soooo hope that didn't cornfuse you more. Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 oh and btw.. you should also add sleep 0.35; deleteVehicle _obj; to the file.. like _obj setpos [(getPos _unit select 0),(getPos _unit select 1) ,(getpos _unit select 2) -0.1]; _Anade setpos [(getPos _unit select 0),(getPos _unit select 1) ,( getpos _unit select 2) +0.1]; sleep 0.35; deleteVehicle _obj; else you will get a flame stuck in the sky after the bomb has gone off Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 I'm about ready to buy a gun... and shoot my foot. Now how I've survived 1.5 semesters thus far on PC programming is beyond me. Sorry but what both you and nuxil said have made my eyes cross 300x over. edit: and yes.. the harrier's name is "testpilot" Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 i dont think it will work if you have a harrier flying in full speed passed that little trigger area, you can set down the harrier speed.. edit it, and put in its init feald. this setVelocity [200, 0, 0] i think thats about 200 km/t Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 I only condensed it for the screenshot... Here's what I have.. and no that don't work. The trigger was expanded to 5000m+ high and 500m+ wide.. I've made it 5000x5000 and it still don't work... Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 ok im gonna be nice and give you my aa script. // // This is an Anti Air craft script.. in alpha stage.. // dont get anoyed by my bad spelled english,, i could rather write it in norwegian :P // //need the mission to compleate the load.. sleep (1+(random 3)); _AAvehicle = (_this select 0) ; _i=0; //this script sleeps min 2 sec. which is 20000 sec before the termination of the loop. thats 5 1/2 houers. for [{_i=0},{_i<1},{_i=_i}] do { WestTriggerOne = createTrigger ["EmptyDetector", position _AAvehicle]; WestTriggerOne setTriggerActivation ["EAST", "PRESENT", true]; WestTriggerOne setTriggerType "NONE"; WestTriggerOne setTriggerArea [150, 150, 30, false ]; sleep 2; //get a list of enemy units inside the trigger. _whohere = list WestTriggerOne ; _nr=count (_whohere); _a=0; for [{_a=0},{_a<_nr},{_a=_a+1}] do { //make the trigger big.. //? WestTriggerOne setTriggerArea [1500, 1500, 0, false ]; _unit = _whohere select _a; _nameAA= name _AAvehicle; _HELI=30; _PLAIN=90; _Value=0; _locktime=0; _Eclass=typeof _unit; _Epos= getpos _unit; _Ename= name _unit; _Ehight = getpos _unit select 2; _Espeed = round (speed (vehicle _unit)); _Edirection = (round ((getdir _unit)/22.5)) mod 16; _Edistance=_unit distance _AAvehicle; _b=0; if ((_Eclass == "Su34") || (_Eclass == "Su34B")) then { _Value=_PLAIN; _locktime=6; } else { _Value=_HELI; _locktime=4; }; // end class if (( side _unit != side _AAvehicle) && ( _unit iskindOf "AIR" ) && (_Ehight > _Value) && (_Ehight < 800) && ((getdammage _unit) <0.8 ) ) then { _lockon=format["West: %1 locking on\nEast: %2,",_nameAA , _Ename]; hint format["%1", _lockon]; sleep (_locktime); hint ""; //check the hight again,,, we want to be able to avoid the AA vehicle.. if ( _Ehight < _Value ) then { _b=2; }; if ( (side _AAvehicle == side player) && (player distance _AAvehicle<25) ) then { _Edir = switch (_Edirection) do { case 0: {"N"}; case 1: {"NNE"}; case 2: {"NE"}; case 3: {"NEE"}; case 4: {"E"}; case 5: {"SEE"}; case 6: {"SE"}; case 7: {"SSE"}; case 8: {"S"}; case 9: {"SSW"}; case 10: {"SW"}; case 11: {"SWW"}; case 12: {"W"}; case 13: {"NWW"}; case 14: {"NW"}; case 15: {"NNW"}; }; //end switch do // give close by player info about targets etc etc.. _mystring=format["AA Targeting: %1\nHeading: %2\nDistance: %3\nSpeed: %4\nHight: %5\n", _unit, _Edir,_Edistance, _Espeed, _Ehight]; hint format["%1", _mystring]; sleep 1; }; //end "if" targeting info for player on AA side.. // we shoot 2 missiles.. 1 extra incase the first one didnt do enought damage.. :P while { (_b < 2 ) && ( _AAvehicle in _AAvehicle ) && (getdammage _AAvehicle < 0.7) && (getdammage _unit < 0.6)} do { // dowatch dosent work all the time.. _AAvehicle Dowatch [getPos _unit select 0,getPos _unit select 1,getPos _unit select 2]; // Presicion "5 meter +/-" _rnd=((random 10) -5); // Make sound & smoke around the vehicle //_AAvehicle say "AA"; //_AAvehicle execvm "missilesmoke.sqf"; //_AAvehicle execvm "smoke.sqf"; // time before missle impact ""RIM-7M/P Sea Sparrow"" we use this missle.. has a speed of 4256 km/h _distance = _AAvehicle distance _unit; _speed = 4256; _time= (_distance / _speed) ; sleep (1+ _time); // Creat the bomb and the shell; _obj="Bomb" createVehicle [0,0,0]; _Anade="Sh_120_SABOT" createVehicle [0,0,0]; // Place the explotion close by.. _obj setpos [((getPos _unit select 0)+ _rnd),((getPos _unit select 1) +_rnd),(((getpos _unit select 2) + _rnd) -0.1)]; _Anade setpos [((getPos _unit select 0)+ _rnd),((getPos _unit select 1) +_rnd),(( (getpos _unit select 2) + _rnd) +0.1)]; sleep 0.35; deleteVehicle _obj; _b=_b+1; hint ""; }; //end the while // resize the trigger after the shots WestTriggerOne setTriggerArea [5, 5, 30, false ]; }; // end if iskindOf "AIR" //check the status of the unit we just shot at.. if (getdammage _unit < 0.7) then {_a=_a;} else {_a=_nr; hint ""; }; }; // end 2nd loop //check if ower unit is dead.. and end the loop if dead. if (( _AAvehicle in _AAvehicle ) && (getdammage _AAvehicle < 0.7)) then {_i=_i;} else {_i=1;}; }; // end 1st loop its a messy script, meant to shoot down east side,, but just change the trigger if you want to shoot down others, WestTriggerOne setTriggerActivation ["EAST", "PRESENT", true]; to WestTriggerOne setTriggerActivation ["WEST", "PRESENT", true]; is you want WEST to use the script.. just place a unit,, ex a stryker, and in its initfeald put. AA=[this] execvm "AA.sqf" Share this post Link to post Share on other sites
Big Dawg KS 6 Posted March 15, 2007 i dont think it will work if you have a harrier flying in full speed passed that little trigger area, you can set down the harrier speed.. edit it, and put in its init feald. this setVelocity [200, 0, 0] i think thats about 200 km/t Hahaha, am I the only one who noticed the missing underscore in the original script before 'this'? Yea that script will work you just need to fix one tiny mistake in it. Quote[/b] ]_unit = (this select 0) Should be: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0 That's why it wasn't working, it wasn't your fault Victor. Â Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 it should not mattre if its written like, _unit = (this select 0); but whats mattre is he wrote unit = (this select 0); Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 1. Copied script exactly. 2. Kyle, you obviously don't read the poster whom you're poking fun of... check post from Posted on Mar. 15 2007,01:34. 3. Init field and everything shown and copied exactly from post.. Still dont work. Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 i didnt say for you to put the AA script into a trigger.. i dont know how that will work. since the script itself creats a trigger.. place that on a unit.. if it still it dosent work, it must be something other issues, Share this post Link to post Share on other sites
Big Dawg KS 6 Posted March 15, 2007 Oh, my bad, in that case, try setting your trigger to Anybody Present instead of Anybody Detected By Resistance... unless you already have after you took that screenshot? Â Then maybe the old script will work... Share this post Link to post Share on other sites
BLSmith2112 0 Posted March 15, 2007 I quit.. I'm just going to face facts... It's impossible. This has taken hours for a simple script. I'm just not even going to finish this video ether. It's never going to be done. The script is impossible and I really don't see myself checking in on this thread again. Share this post Link to post Share on other sites
nuxil 2 Posted March 15, 2007 It works fine for me,, http://www.picfury.com/29/AAmissile3-1.html http://www.picfury.com/29/AAmissile4-1.html Share this post Link to post Share on other sites