Jump to content
  • 0
Ghost

Armored SUV Gun Animations

Question

I managed to make the Armored SUV turret opens and closes, the only issue is the gunner sticks out of the SUV when the turret is closed.

I utilized this thread as a reference

 

http://opendayz.net/threads/armored-suv-gun-animations.14848/

 

along with this one

 

http://opendayz.net/threads/release-mv22-ramp-door-animations.12520/

 

and I'm currently trying to see if the lock turret portion of this script can be utilized to finish it or if the turret can be opened automatically when a player enters the gunner seat if closed

 

http://www.armaholic.com/page.php?id=18709

 

 

 

Anyone got any ideas?

Share this post


Link to post
Share on other sites

38 answers to this question

Recommended Posts

  • 0

Additional Information:

Install Instructions

1) Download the attached script and extract in your main mpmission folder. 

i.e. \MPMissions\DayZ_Epoch_11.Chernarus\

 

2) In your mpmission folder open your init.sqf file

and find:

 

if (!isDedicated) then {
 
Insert the following line under the _playerMonitor = [] execVM .......
 
_Armored_SUV_PMC_DZE_turret = [] execVM "Custom\VehicleActions\suvpmc_init.sqf";

 

 

Files:

suvpmc_init.sqf

#include "suvpmc_functions.sqf"


{
_vcl = _this select 0; //set the vehicle to _vcl
_vcl setVariable ["suvpmc_cover", 0, true]; //create a variable for the cover
_closeCover = _x addaction ["Close Cover","Custom\VehicleActions\suvpmc_addAction.sqf",[[],suvpmc_closecover],7,true,false,"","player == gunner _target && format [""%1"",_target getVariable ""suvpmc_cover""] != ""1"""]; //add action to close cover, details to come
_openCover = _x addaction ["Open Cover","Custom\VehicleActions\suvpmc_addAction.sqf",[[],suvpmc_opencover],7,true,false,"","player == gunner _target && format [""%1"",_target getVariable ""suvpmc_cover""] == ""1"""]; //add action to open cover

} foreach (nearestObjects [[3000,3000,0], ["ArmoredSUV_PMC_DZE"], 50000]); //Get all Armored SUV vehicles in map

 
suvpmc_addAction.sqf

_array = _this select 3;


_param = _array select 0;
_code = _array select 1;
_spawn = _param spawn _code;

 
suvpmc_functions.sqf

suvpmc_closecover = //function to close Cover


{
_vcl = vehicle player; //assign the vehicle the pilot is in to _vcl
_vcl animate ["HideGun_01",1]; //fold gun down
_vcl animate ["HideGun_02",1]; //fold gun down
_vcl animate ["HideGun_03",1]; //fold gun down
_vcl animate ["HideGun_04",1]; //fold gun down
_vcl animate ["CloseCover1",1]; //close cover1
_vcl animate ["CloseCover2",1]; //close cover2
_vcl setVariable ["suvpmc_cover", 1, true]; //set it closed
WaitUntil {!Alive _veh || format ["%1",_veh getVariable "suvpmc_cover"] != "1"}; //if suvpmc_cover is 0 or it is destroyed, continue with the script
_veh setVariable ["suvpmc_cover", 0,true]; //set suvpmc_cover to 0, not needed, haven't tested if it's needed
};
suvpmc_opencover = //function to open cover
{
_vcl = vehicle player; //assign the vehicle the pilot is in to _vcl
_vcl animate ["HideGun_01",0]; //fold gun down
_vcl animate ["HideGun_02",0]; //fold gun down
_vcl animate ["HideGun_03",0]; //fold gun down
_vcl animate ["HideGun_04",0]; //fold gun down
_vcl animate ["CloseCover1",0]; //close cover1
_vcl animate ["CloseCover2",0]; //close cover2
_vcl setVariable ["suvpmc_cover", 0,true]; //set it opened
};

 
Included 2 versions one for DZE and one for DZ Vehicles

Armored SUV DZ Turret Script.zip

Armored SUV DZE Turret Script.zip

Share this post


Link to post
Share on other sites
  • 0

I can confirm it works 100% were you in the gunner seat of the SUV and also

in the suvpmc_init.sqf 

change this line

 

} foreach (nearestObjects [[3000,3000,0], ["ArmoredSUV_PMC_DZ"], 50000]); //Get all Armored SUV vehicles in map

 

for

 

} foreach (nearestObjects [[3000,3000,0], ["ArmoredSUV_PMC_DZE"], 50000]); //Get all Armored SUV vehicles in map

 

if you are using DZE Vehicles

Share this post


Link to post
Share on other sites
  • 0

I can confirm it works 100% were you in the gunner seat of the SUV and also

in the suvpmc_init.sqf 

change this line

 

} foreach (nearestObjects [[3000,3000,0], ["ArmoredSUV_PMC_DZ"], 50000]); //Get all Armored SUV vehicles in map

 

for

 

} foreach (nearestObjects [[3000,3000,0], ["ArmoredSUV_PMC_DZE"], 50000]); //Get all Armored SUV vehicles in map

 

if you are using DZE Vehicles

Works now thanks, But it looks rather funny because the player is still sticking out.

 

Great Script!

Share this post


Link to post
Share on other sites
  • 0

Yeah still working on the gunner getting moved out to the passenger seat to avoid him sticking out lol

then we would probably have to make it so when a player enters the gunner seat the turret comes up

Share this post


Link to post
Share on other sites
  • 0

I found this in another script it may help, i got the hatch to close and the person goes to the rear passenger seat.

 

(gunner _vcl) action ["moveToCargo", _vcl,1];

 

Regards

 

p.s I will post the full script when i have time later today.

Share this post


Link to post
Share on other sites
  • 0

Sure its on the first part of the suvpmc_functions.sqf,

 

suvpmc_closecover = //function to close Cover

{

    _vcl = vehicle player; //assign the vehicle the pilot is in to _vcl

    (gunner _vcl) action ["moveToCargo", _vcl,1]; <----------------------(Here)

    _vcl animate ["HideGun_01",1]; //fold gun down

    _vcl animate ["HideGun_02",1]; //fold gun down

    _vcl animate ["HideGun_03",1]; //fold gun down

    _vcl animate ["HideGun_04",1]; //fold gun down

    _vcl animate ["CloseCover1",1]; //close cover1

    _vcl animate ["CloseCover2",1]; //close cover2

    _vcl setVariable ["suvpmc_cover", 1, true]; //set it closed

    WaitUntil {!Alive _veh || format ["%1",_veh getVariable "suvpmc_cover"] != "1"}; //if suvpmc_cover is 0 or it is destroyed, continue with the script

    _veh setVariable ["suvpmc_cover", 0,true]; //set suvpmc_cover to 0, not needed, haven't tested if it's needed

};

 

Regards

 

p.s I think  (gunner _vcl) action ["moveToCargo", _vcl,1]; was called (gunner_car) in the other script.

 

Share this post


Link to post
Share on other sites
  • 0

Can you post a "How To" in the server mods forum for how to get all of this working? It looks like it's working now so might as well share the completed work.

 

I'm not able to get the option to turn the gun down when I messed with this.

Share this post


Link to post
Share on other sites
  • 0

I will have a look at my files but i think i just used Ghosts 2nd post to get it working, just need to add the bit I found to get into the back seat. And yeah I have not got the opposite way from back seat to gun working yet either.

Share this post


Link to post
Share on other sites
  • 0

Thank for taking the time to reply Asian Kid. Cant seem to see why it will not work for me.

 

Located in my "custom folder"

 

https://www.dropbox.com/sh/es1rhjzqhryjj8r/9TbXUjZg2S

 

 

dayz_epoch_13.Tavi\init.sqf

//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =  [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; 
_Armored_SUV_PMC_DZE_turret = [] execVM "custom\VehicleActions\suvpmc_init.sqf";

Am trying on the right type of DZE SUV

 

Anyone mind taking a look to see if there is an issue?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By theduke
      Hi Epoch community,
      Have you ever wanted a way for players to be able to see your server rules while in-game?
      Are you tired of repeating yourself with simple answers to simple questions?
      Looking for a different way to deploy items or call certain scripts?
      Our community uses mostly scripts from this awesome epoch community. Its our time to give back :)
      I've decided to make a release version of my GUI for everyone to use.
      Download UPDATED FOR 1061: https://github.com/theduke77/Custom-Menu
      Or follow this link
      https://epochmod.com/forum/topic/43462-release-custom-gui-menu-updated-for-1061/In the video, i have my community colors in the GUI, the release version I tried to match the zupa colors.
       
      Video
      I've received tremendous help from SHIX. Most of the credit goes to him for explaining to me how to do this.
      also, I've used the code he provided as a template and built this from that.
      He kindly allowed me to share with all of you
      Ok, now for the fun part.
      This is NOT for someone new to the world of epoch server management. (probly because of my instructions lol)
      This is NOT a plug-n-play addon. You must configure all the files and customize the menu
      I would strongly suggest you have a test server to be able to test it as you create new pages.
      Try one page to make sure it looks good, then go from there.
      If you want to change the colors of stuff, check out the options section before creating pages.
      I will do my best to explain to the best of my knowledge.
      I'm far from being a coder lol
      Tools required
      Notepad ++
      PBO Tool
      patience...with my instructions ;)
      TextView (optional)
      Installation:
      How to create new pages
       
      OPTIONAL
      Known issues
      Many thanks to SHIX. Without him explaining this GUI stuff to me I wouldn't of made it lol
      Thanks to Kill Zone kids blogs, they are amazing to learn from.
      Hope you guys enjoy it.
      I will support this to the best of my knowledge :)
       
      16/02/2017 UPDATE
      Thank you to @Casual_Jeff for this 1.0.6 FIX
       
    • By Donnovan
      CASCA ANDRE CONVOYS - TAKELONG V1a:
      V1a ON 01 of September of 2015
       
      NEW ON TAKELONG V1:
      New Skill Settings:
      _generalSkill = 0.6; //All skills, except ain skill, for all AI _driverManAin = 0.8; //Ain of the driver, from 0 to 1 _cargoMansAin = 0.5; //Ain of the cargo ocupants, from 0 to 1 _turretMansAin = 0.3; //Ain ot the turret operators, from 0 to 1 New Icon settings:
      _showMapIcons = true; //Show spawn, convoy and AI icons on map? _showMapIconsOnlyWhenNotInWar = true; //Hide convoy icons when they enter in war, so the fight is not spoted. _showCrewNumber = true; //Show crew number on the vehicle icon on map? (runner bombers don't count as vehicle crew)   Special reward in coins (Zupa coins) or gold (normal Epoch): _useCoinsReward = false; //Special kill (main char kill or combo kill) reward in gold or coins? Use false to gold / true to coins. _coinRewards = [650,4000,650]; //Special Reward Array: _xxxxxRewards = [kill reward,son of general kill reward,extra for each combo kill]; _goldRewards = [["ItemSilverBar",0],["ItemGoldBar10oz",1],["ItemGoldBar",1]]; //Special Reward Array: _xxxxxRewards = [kill reward,son of general kill reward,extra for each combo kill]; Combo kill is when you kill more 2 AI in the space of 15 seconds. The level of the combo increase if you keep killing in less than 15 seconds (Combo Level 1, Combo Level 2, Combo Leve 3, and so on). While the combo kill reward in coins goes direct to the player wallet, in gold, it goes in the AI dead body.   Humanity Gain Settings: donn_humanityGainForKill = 65; //How much humnity to gain for each AI kill?   //Bellow this value you is in the Bandit Way so donn_humanityGainForKill will subtract to your humanity //Above this value you is in the Hero Way so donn_humanityGainForKill will add to your humanity donn_humanityZeroScale = 2500;   Other Settings: _donn_delete_body_time = 2400; //Time in seconds to delete a dead AI body donn_aiCarVulnerable = false;  //false or 0 is INVUNERABLE true or 1 is VULNERABLE  
      NEW ON TAKELONG V1a:
      Bidirectional Humanity: Fixed bandit (or on the bandit way) players getting positive humanity from AI kill.
      NEW ON TAKELONG V1b:
      Coin rewards: Fixed coins rewards not happening due to a typo.
      Manual fix if you have V1a: Inside andre_convoy.sqf change the configuration setting from _coinsRewards = [650,4000,650]; to _coinRewards = [650,4000,650];
       
      If it works for you consider a donation. Thankyou.

      $USD
      $EURO

       
      INSTALATION: TAKELONG V1b

      Unzip this file into your mission folder: https://www.dropbox.com/s/wd4dyodm7prnu4d/arma2_epoch_andre_convoy_takelong_v1b.7z?dl=0
      Look at init(example).sqf to see how to run Andre Convoy, and reproduce it in your init.sqf.
      No BE filters tweak needed.
       
       
      INFISTAR USERS:
      If your infiStar have this option:
      /*  EXPERIMENTAL CU FIX   */ _CUF = true; /* true or false */ /* *experimental* - will transfer serverside units (including mission AI) to clientside */ You need to turn it off setting _CUF to false, or AI will not work.
    • By GaspArt
      Howdy, ladies and gentlemen! After a long break with Arma 2, I finally decided to bring script to mind.
      Nothing amazing, just made enjoyable dialogs and opportunity for admins to choose how script will work:
      If 1 case will be fixed price for healing of whole body. In 2 case price creates relatively amount of disesases.

      I thought to create another topic for more comfortable discussions.
      Special thanks to Axeman for correcting mistakes in script.

      Let's go! To install this script you need:
      1. Zupa's Coin System of 2 or 3 version.
      2. Custom fnSelfactions.sqf ( you can take from dayz_code.pbo of Epoch, paste in mission file and change path to it in compiles.sqf )
      3. Custom variables.sqf ( you can take from dayz_code.pbo of Epoch, paste in mission file and change path to it in init.sqf )


      Install guide:
      1. Open fnSelfactions.sqf and paste this code above " //Allow owner to pack vault ". So it must be like that:
       
      if(_typeOfCursorTarget in Fast_Med and (player distance _cursorTarget < 3)) then { if (s_fast_med_dialog1 < 0) then { s_fast_med_dialog1 = player addAction ["<t color='#06FF15'>Pay for healing</t>", " WRITE HERE PATH TO SQF!!! ",_cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_fast_med_dialog1; s_fast_med_dialog1 = -1; }; //Allow owner to pack vault
      Then find 
      player removeAction s_player_fuelauto2; s_player_fuelauto2 = -1; and place under them that code:
       
      player removeAction s_fast_med_dialog1; s_fast_med_dialog1 = -1;

      2.Open variables.sqf and add this code after "disableSerialization;":
       
      Fast_Med = ["NPC1","NPC1","NPC1"]; For instance 11 Chernarus:
      Fast_Med = ["Dr_Annie_Baker_EP1","Doctor","Dr_Hladik_EP1"];
      Then find:
      dayz_resetSelfActions = { and paste under this code:
       
      s_fast_med_dialog1 = -1;

      3. Create .sqf file and paste code from  http://pastebin.com/QMukAuXP
      4. Change configs in script
      5. Enjoy! :)
       
    • By StiflersM0M
      Hey hey,
      I wrote a small fix for the glitch here: https://github.com/vbawol/DayZ-Epoch/issues/1576, this will place a indestructible wood wall in the front of the metal gate on server start and will be removed, if you unlock the gate. 
      Cause i hate self actions i was not in the state to write a self action for it to turn it on again if the gate is locked, Feel free to make one and post it here :)
       
      So lets start, you will need: Custom compiles.sqf, Player_UnlockDoor.sqf, and some edits in the server_monitor.sqf.
       
      1.
      In your custom compiles.sqf find:
      player_unlockDoor = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockDoor.sqf"; And Replace it with your custom path to the player_unlockDoor.sqf in my case:
      player_unlockDoor = compile preprocessFileLineNumbers "custom\player_unlockDoor.sqf"; 2.  If you dont have a custom player_unlockDoor.sqf copy it out of the dayz_code folder and paste it in your custom folder or any path you point above.
      3. In player_unlockDoor.sqf find:
      KeyCodeTry = nil; And add above this:
      if ((typeOf _obj) == "CinderWallDoorLocked_DZ") then { _antiglitchvari = _obj getVariable "antiGlitchWall"; if !(isNil "_antiglitchvari") then { deleteVehicle _antiglitchvari; _obj setVariable ["antiGlitchWall", Nil, true]; }; }; If you are done it should look like this:
      http://s14.directupload.net/images/141014/sd5ob7hl.jpg
       
      4.  In server_monitor.sqf (usually in your dayz_server.pbo/system/) if you use plot 4 life, it should be in your mission, find this:
      if (count _intentory > 0) then { //or this if you use plot management: if ((count _inventory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ")) then { and add above:
       
      if ((typeOf _object) == "CinderWallDoorLocked_DZ") then { _location = _object getVariable["OEMPos",(getposATL _object)]; _dir = getDir _object; _objectCharacterID = _object getVariable ["CharacterID","0"]; _ownerID = _object getVariable["ownerPUID","0"]; _objectglitchwall = createVehicle ["WoodSmallWall_DZ", [0,0,0], [], 0, "CAN_COLLIDE"]; _objectglitchwall setDir _dir; _objectglitchwall setPosATL _location; _objectglitchwall setVariable ["ownerPUID",_ownerID,true]; _objectglitchwall addEventHandler ["HandleDamage", {false}]; _objectglitchwall enableSimulation false; _object setVariable ["antiGlitchWall", _objectglitchwall, true]; }; So it should look like this:
      http://s14.directupload.net/images/141014/5hwht7hy.jpg
       
      If you dont use Plot 4 life, find in step 4 this lines:
      _ownerID = _object getVariable["ownerPUID","0"]; _objectglitchwall setVariable ["ownerPUID",_ownerID,true]; And replace this lines with this:
      _ownerID = _object getVariable["CharacterID","0"]; _objectglitchwall setVariable ["CharacterID",_ownerID,true]; That should be all.
       
       
    • By ZingFreelancer
      You know that DayZ feeling when you have been out doing missions for 3 hours and finally coming back to base, flying your black hawk with a SUV in tow, rich and full of gear?
      Then when you drop the SUV, instead of dropping bellow the heli like it usually does it drops above it. You see that and realize that everything is going to hell in a matter of milliseconds and there is nothing you can do to stop the gravity of the situation.
      Black Hawk gets hit by the SUV, tossed into nearby trees and explodes, then to make matter worst some jackass hears the commotion and loots whatever survived of your misfortune. 
      The icing on the cake are the admin who refuses to assist you because they decided to go on strike :-/



       
      So, anyone else experienced something similar in DayZ?
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...