Jump to content

fl4shrewind

Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About fl4shrewind

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This is one of my first scripts I ever made and I have spent no time to make it more condenced but it works and it's beautifal :D ! In this script it will spawn a US Destroyer (big boat), then attach an Apache to it along with a few other decorative props, and lastly a red, white, and blue smoke trail for your skywritting needs. This was originally in my admin menu I made so Its designed to be in a menu tree on my Action menu. I've removed what I could of that aspect so all you have to do is pick a way to execute this command however I will supply one way for you if you do not know how. This script has no real purpose other than something fun to show your friends. Originall inspiration was from the PapuWarfare test server, I saw Viba spawn in huge boat and fly it around, I was forever inspired to one day get that to work and I have surely built apawn it. <3 Viba and Papu, RIP Server. I also had an automatic cleanup feature in this scrip which you may not like since for testing reasons I had spam my hint box and you may just want to look at this work of art and it automatically removes it shortly afer you exit the vehicle. So here it is! STEPS: 1) Create a text document and save it as "flyingDestroyerT1.sqf" in the MP mission (or SP) folder that you will use in step 2 Example Directory: C:\Users\Joey\Documents\ArmA 2\MPMissions\ReWind%20ExampleMissionName.Chernarus 2) In your mission editor, add a playable unit. Under its initialization field paste this into it: family1 = _unit addAction ["<t color='#9A2EFE'>- </t><t color='#FF0000'>M</t><t color='#FFFFFF'>u</t><t color='#0000FF'>r</t><t color='#FF0000'>i</t><t color='#FFFFFF'>c</t><t color='#0000FF'>a</t> <t color='#FF0000'>A</t><t color='#FFFFFF'>i</t><t color='#0000FF'>r</t><t color='#FF0000'>l</t><t color='#FFFFFF'>i</t><t color='#0000FF'>n</t><t color='#FF0000'>e</t><t color='#FFFFFF'>s</t>", "flyingDestroyerT1.sqf"]; 3) In "flyingDestroyerT1.sqf" copy and paste The code below into the file and save it. ////////////////////////////////////// // // // The Real American Destroyer // // By: ReWind // // Steam: // http://steamcommunity.com/id/45645667867834534/ ////////////////////////////////////// //Identifing Player //Spawning the Apache on players position //Moving player in driver seat of Apache //Spawning Destroyer on players position //Attaching Destroyer to Apache //Getting player Direction before spawn //Telling player the direction they faced //Setting Apache and player direction where player looked _unit = _this select 0; _position = getPos _unit; // you can spawn this anywhere since your player is automatically moved to driver _vehicle = "BAF_Apache_AH1_D" createVehicle (_position); // You may change "BAF_Apache_AH1_D" to any vehicle classname you want and it will function the same _vehicle engineOn true; // False to spawn the vehicle off _unit moveInDriver _vehicle; // !!You NEED this otherwise there is no way to get into the driver seat!! _vehicle allowDamage true; // Set False to make the chopper indestructable (if you crash a heli while invincable it still often times explodes) _vehicle0 = "Land_Destroyer" createVehicle (_position); // There is also another boat I think it is called "Land_Fragetta" not sure but you can interchange them however the props will not allign properly _vehicle0 attachTo [_vehicle,[ 0, 0, 4.5]]; _vehicle0 setVectorDir[0,0,180]; _vehicle0 setDir 180; _direction = getDir _unit; hintSilent format["Based on the direction you were looking, the Object will spawn facing: %1 degrees",_direction]; _vehicle setDir (_direction); _unit setDir (_direction); //Adding other props to give detail _vehicleProp13 = "C130J_static_EP1" createVehicle (_position); _vehicleProp13 attachTo [_vehicle,[7,0,11.5]]; _vehicleProp14 = "C130J_static_EP1" createVehicle (_position); _vehicleProp14 attachTo [_vehicle,[-7,0,11.5]]; _vehicleProp13 setVectorDir[0,0,180]; _vehicleProp14 setVectorDir[0,0,180]; _vehicleProp13 setDir 180; _vehicleProp14 setDir 180; _vehicleProp1 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp1 attachTo [_vehicle,[ 7.65, -25.22, 16.5]]; _vehicleProp2 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp2 attachTo [_vehicle,[ -7.65, -25.22, 16.5]]; _vehicleProp3 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp3 attachTo [_vehicle,[ 7.6, -27.82, 16.5]]; _vehicleProp4 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp4 attachTo [_vehicle,[ -7.6, -27.82, 16.5]]; _vehicleProp5 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp5 attachTo [_vehicle,[ 7.5, -31.3, 16.5]]; _vehicleProp6 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp6 attachTo [_vehicle,[ -7.5, -31.3, 16.5]]; _vehicleProp7 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp7 attachTo [_vehicle,[ 7.5, -33.9, 16.5]]; _vehicleProp8 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp8 attachTo [_vehicle,[ -7.5, -33.9, 16.5]]; _vehicleProp9 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp9 attachTo [_vehicle,[ 7.39, -37.38, 16.5]]; _vehicleProp10 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp10 attachTo [_vehicle,[ -7.39, -37.38, 16.5]]; _vehicleProp11 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp11 attachTo [_vehicle,[ 7.34, -39.28, 16.5]]; _vehicleProp12 = "FlagCarrierUSA_EP1" createVehicle (_position); _vehicleProp12 attachTo [_vehicle,[ -7.34, -39.28, 16.5]]; //Maintaining smokes when player is alive //Spawning Blue Smokes //Attaching Blue smokes to Apache even with back of destroyer //Starting cleanup, when vehicle is not active, smokes stop, props are then removed. Also deletes props if the vehicle explodes while {alive _vehicle} do { if (vehicle player == _vehicle) then { hint "Vehicle Active: True"; _vehicle1b = "SmokeShellBlue" createVehicle (_position); _vehicle1b attachTo [_vehicle,[0,-70.6,4.5]]; _vehicle2b = "SmokeShellBlue" createVehicle (_position); _vehicle2b attachTo [_vehicle,[0,-70.6,4.7]]; _vehicle3b = "SmokeShellBlue" createVehicle (_position); _vehicle3b attachTo [_vehicle,[0,-70.6,4.9]]; _vehicle4b = "SmokeShellBlue" createVehicle (_position); _vehicle4b attachTo [_vehicle,[0,-70.6,5.1]]; _vehicle5b = "SmokeShellBlue" createVehicle (_position); _vehicle5b attachTo [_vehicle,[0,-70.6,5.3]]; _vehicle6b = "SmokeShellBlue" createVehicle (_position); _vehicle6b attachTo [_vehicle,[0,-70.6,5.5]]; _vehicle7b = "SmokeShellBlue" createVehicle (_position); _vehicle7b attachTo [_vehicle,[0,-70.6,5.7]]; _vehicle8b = "SmokeShellBlue" createVehicle (_position); _vehicle8b attachTo [_vehicle,[0,-70.6,5.9]]; _vehicle9b = "SmokeShellBlue" createVehicle (_position); _vehicle9b attachTo [_vehicle,[0,-70.6,6.1]]; //Spawning Red Smokes //Attaching Red smokes to Apache even with back of destroyer _vehicle1r = "SmokeShellRed" createVehicle (_position); _vehicle1r attachTo [_vehicle, [0,-70.6,6.3]]; _vehicle2r = "SmokeShellRed" createVehicle (_position); _vehicle2r attachTo [_vehicle, [0,-70.6,6.5]]; _vehicle3r = "SmokeShellRed" createVehicle (_position); _vehicle3r attachTo [_vehicle, [0,-70.6,6.7]]; _vehicle4r = "SmokeShellRed" createVehicle (_position); _vehicle4r attachTo [_vehicle, [0,-70.6,6.9]]; _vehicle5r = "SmokeShellRed" createVehicle (_position); _vehicle5r attachTo [_vehicle, [0,-70.6,7.1]]; _vehicle6r = "SmokeShellRed" createVehicle (_position); _vehicle6r attachTo [_vehicle, [0,-70.6,7.3]]; _vehicle7r = "SmokeShellRed" createVehicle (_position); _vehicle7r attachTo [_vehicle, [0,-70.6,7.5]]; _vehicle8r = "SmokeShellRed" createVehicle (_position); _vehicle8r attachTo [_vehicle, [0,-70.6,7.7]]; _vehicle9r = "SmokeShellRed" createVehicle (_position); _vehicle9r attachTo [_vehicle, [0,-70.6,7.9]]; //Spawning White Smokes //Attaching White smokes to Apache even with back of destroyer _vehicle1w = "SmokeShell" createVehicle (_position); _vehicle1w attachTo [_vehicle, [0,-70.6,4.3]]; _vehicle2w = "SmokeShell" createVehicle (_position); _vehicle2w attachTo [_vehicle, [0,-70.6,4.1]]; _vehicle3w = "SmokeShell" createVehicle (_position); _vehicle3w attachTo [_vehicle, [0,-70.6,3.9]]; _vehicle4w = "SmokeShell" createVehicle (_position); _vehicle4w attachTo [_vehicle, [0,-70.6,3.7]]; _vehicle5w = "SmokeShell" createVehicle (_position); _vehicle5w attachTo [_vehicle, [0,-70.6,3.5]]; _vehicle6w = "SmokeShell" createVehicle (_position); _vehicle6w attachTo [_vehicle, [0,-70.6,3.3]]; _vehicle7w = "SmokeShell" createVehicle (_position); _vehicle7w attachTo [_vehicle, [0,-70.6,3.1]]; _vehicle8w = "SmokeShell" createVehicle (_position); _vehicle8w attachTo [_vehicle, [0,-70.6,2.9]]; _vehicle9w = "SmokeShell" createVehicle (_position); _vehicle9w attachTo [_vehicle, [0,-70.6,2.7]]; sleep 15; } else { hint "Vehicle Active: False"; sleep 1; hint "Removing inactive spawns and ending script"; deleteVehicle _vehicle; deleteVehicle _vehicle0; deleteVehicle _vehicle1b; deleteVehicle _vehicle2b; deleteVehicle _vehicle3b; deleteVehicle _vehicle4b; deleteVehicle _vehicle5b; deleteVehicle _vehicle6b; deleteVehicle _vehicle7b; deleteVehicle _vehicle8b; deleteVehicle _vehicle9b; deleteVehicle _vehicle1r; deleteVehicle _vehicle2r; deleteVehicle _vehicle3r; deleteVehicle _vehicle4r; deleteVehicle _vehicle5r; deleteVehicle _vehicle6r; deleteVehicle _vehicle7r; deleteVehicle _vehicle8r; deleteVehicle _vehicle9r; deleteVehicle _vehicle1w; deleteVehicle _vehicle2w; deleteVehicle _vehicle3w; deleteVehicle _vehicle4w; deleteVehicle _vehicle5w; deleteVehicle _vehicle6w; deleteVehicle _vehicle7w; deleteVehicle _vehicle8w; deleteVehicle _vehicle9w; deleteVehicle _vehicleProp1; deleteVehicle _vehicleProp2; deleteVehicle _vehicleProp3; deleteVehicle _vehicleProp4; deleteVehicle _vehicleProp5; deleteVehicle _vehicleProp6; deleteVehicle _vehicleProp7; deleteVehicle _vehicleProp8; deleteVehicle _vehicleProp9; deleteVehicle _vehicleProp10; deleteVehicle _vehicleProp11; deleteVehicle _vehicleProp12; deleteVehicle _vehicleProp13; deleteVehicle _vehicleProp14; }; sleep 3; hint "script cycled"; sleep 1} THE REST IS OPTIONAL from this point on 4) IF you want to remove the auto-clean-up feature, simply replace lines 150 all the way to the end of the script seen below else { hint "Vehicle Active: False"; sleep 1; hint "Removing inactive spawns and ending script"; deleteVehicle _vehicle; deleteVehicle _vehicle0; All the way to the last line with this: else { hint "Vehicle Active: False"; sleep 1; hint "Autocleanup: Dissabled"; }; sleep 3; hint "script cycled"; sleep 1} Thats all, if you like this hit me up on steam, I have loads of nutty admin tools I have created, I'd be glad to share some.
  2. Hello first off, I'm not sure if this is the correct place to post this. I was on the fence between here and "ARMA 2 & OA : ADDONS - Configs & Scripting". Im want to know more about the actuall scripts/commands than the addon itself so I think it belongs here. Edit this post as you wish. I saw someone use a debug console and I thought it was the greatest thing I have eveer seen in Arma. However now having one (This one in specific https://forums.bistudio.com/topic/72232-debug-console-for-arma-2/ ) I dont quite understand it. For example I managed to get some things working like: hint format ["Hello %1",getPos player]; cursorTarget setDamage 1 cursorTarget setDamage 0 player setPos [(getPos player select 0) +10, getPos player select 1, getPos player select 2]; but if I tried to run a script (that I know works when executed from my action menu) It did only some parts like hints, and finding my direction, but I didn't spawn anyvehicles in like it should have. Here is the line I executed in the console: _handle = execVM "flyingDestroyerT1.sqf"; This above is me not understanding how this works especially why I cannot for the life of me figure out how to spawn a vehicle from it. Next, since I I managed to get "player setPos" above to work, I wanted to try to make a command to teleport infront of myself like the one in infistar by branching off of that command since it only moves me one direction reguardless of where I faced. So I came up with this, which doesn't work: player setPos (player getPos [50,(getDir player)]); I saw in the wiki That I could use the getPos command like this: player getPos [10,45]; to get the position 45degrees and 10 feet away from me so I thought I would replace 45 with getDir since I know that worked for an output in the debug console but nothing happened once executed, I tried many forms of this with no success so I succome to the forum. Shorted down, my end questions are: -Why/how can I spawn vehicles in debug (I've seen it happen in Arma 3) -any basic info I should know about the debug console since I found little to no info/help on it. -How to get the TP infront of me command/script to work. -Why only half of my script "flyingDestroyerT1.sqf" ran when used in the console (I can include this if you wish). Thanks, this is pretty much my first post, sorry for mistakes or this being impossible to understand, I tried my best!
×