Jump to content

Question

Hi all, Ive been looking for a while now for a vehicle flip script for a single player.

Ive tried stuff ive used on previous servers but its not allowing the option so im guessing epoch has something that interferes with it.

If anyone knows of a simple script to allow players to do this could you link it to me please,

Thanks in advance.

PS. Im aware the jacks flip vehicles but I actually  find this to be incredibly painstaking unless theirs a trick to it.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 1

And here is a better solution, now using the dynaMenu and checking that the vehicle is unlocked and you were the last driver (thus dealing with the issue of object locality). All changes are in the mission file.

Add the following to epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp:

// Flip Vehicle
class flip_vic
{
	condition = "dyna_isVehicle && !dyna_locked";
	action = "[dyna_cursorTarget] call FlipVic;";
	icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_upgrade.paa";
	tooltip = "Flip Vehicle";
};

Add a script in the folder where you store your custom ones, for example custom/, called FlipVehicle.sqf with the following contents:

private ["_target"];

_target = _this select 0;

if (local _target) then {
	_target setVectorUp [0, 0, 1];
	["Flipped vehicle",5] call epoch_message;
} else {
	["You were not the driver of this vehicle",5] call epoch_message;
};

Add the following lines into your mission's init.sqf replacing the script's folder with where ever you put yours:

if(hasInterface) then{
	FlipVic  = compileFinal  preprocessFileLineNumbers "custom\FlipVehicle.sqf";
};

RePBO the mission, upload to the server...

Share this post


Link to post
Share on other sites
  • 0

@webbieAt a very simplistic level, add a script called custom/flip_vehicle.sqf with the following code:

_target = cursorTarget;

if((!isNull _target) && {alive _target} && {_target isKindOf 'Landvehicle' || _target isKindOf 'Air' || _target isKindOf 'Ship'})then {
	_target setVectorUp [0, 0, 1];
	['Flipped vehicle!',0,0.7,2,0] spawn bis_fnc_dynamictext;
};

Add the following line to initPlayerLocal.sqf in the root of your mission file:

	flipvic = player addAction ["<t color=""#F8FF24"">" +"Flip Vehicle","custom\flip_vehicle.sqf","",1,false,false,"",""];	

You now have a scroll wheel action to flip a vehicle. 

Will add some code to check you are the driver (which as an aside also handles the locality issue in MP) and post an update later. 

Share this post


Link to post
Share on other sites
  • 0

Heya Grahame.

would the first instruction - That is an hpp i'm looking into right not sqf?

Add the following to epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.sqf: 

Add the following to epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp

 

 

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 Harkness
      Mods;
      DayZ_Epoch 1.0.6.2 / Namalsk 0.75
      Scripts/Features;
      EMP Storms and ASPI Protection Device
      Freezing Weather and Slow Zombies
      Warm Clothing and APSI @ Traders
      Refuel, Repair, Rearm Stations
      Remove Clothing From Dead
      AI Missions and Events
      Super Mutant Attacks
      Trader Safe-Zones
      Player Kill Feed
      Custom Map
      Alien Rifle
      Raiders
      Snow
      Extras;
      Click Here For Custom Server Settings
      Visit Time2Kill.co.uk for more info
      Discord Invite Link

    • By [email protected]
      Im setting up a new epoch 1.0.6 server with very little addons/mods installed, and when i was testing i realized safes/plotpoles/walls etc werent saving to the server database. Anyone got any ideas what might be wrong?
    • By THAC0_Gewch
      https://github.com/OlofTheBald/DayZ-Humanity-Loadout-Granter/tree/Epoch_1.0.5.1
       
      Updated for 1.0.6.x
    • By Vitor99
      Hi everyone, i would like to know if there is any torrent links for Epoch and Overpoch, if you know some send me the link here
    • By Reaper5150
      Simple but fun little script I put together awhile ago.
      What it does? It is bound to a object in this case "ItemObsidian" as a right click, but can be changed to whatever you want. It then will sends out a message to the players on the server and marks the player with red smoke and a marker on the map.
      The player will then get 2 mins of god mod acting like the amour. Once the amour takes damage (All it is is a countdown timer really) The god mode is then disabled so they can be killed.
      I'm still working on this and will update it when it is done. If any of you better scriptwriters then myself ( I'm still a noob lol) have any ideas on how to improve this? contact me so I can give you credit in the update :)
      Known bugs:
      marker sometimes stays on map Credits to : @Schalldampfer  For helping me understand map markers
      Install: Place this in your scripts folder name it something like Jugg.sqf
      //========================================================
      //========= Juggernaut script-Written by Reaper5150 ===========
      //=======================================================
      sleep 2;
      [nil,nil,rTitleText,"THERE IS A JUGGERNAUT,FIND HIM AND KILL HIM IF YOU CAN!!!","PLAIN",3] call RE;
      sleep 1;
      [nil, player, rSAY, "YOURSOUND.OGG", 100] call RE; //Add your custom sound here when Juggernaut spawns 
      [] spawn {
      player removeMagazine 'ItemObsidian';//Add whatever object you want and bound to your right click function
      sleep 5;
      [nil,nil,rTitleText,"THE JUGGERNAUT HAS BODY ARMOR,WE CAN'T KILL HIM...HELP!!!","PLAIN",3] call RE;
      ////////Set marker/////////////////////////////////////////////////////////////////////
      [] execVM "scripts\marker.sqf";
      //Start Smoke Marker//////////////////////////////////////////////////////////////////////////
      sleep 5;
      PJ_grenade = "SmokeShellRed" createVehicle position player;
      PJ_grenade attachto [vehicle player,[0.1,0,0]];
      sleep 2;
      [nil,nil,rTitleText,"THE JUGGERNAUT (PLAYER) HAS BEEN MARKED WITH SMOKE AND ON THE MAP!!!","PLAIN",3] call RE;
       
      //Temp Godmode for 2 mins////////////////////////////////////////////////////
      (vehicle player) removeAllEventHandlers "handleDamage";
      (vehicle player) addEventHandler ["handleDamage", { false }];    
      (vehicle player) allowDamage false;
       
      //Acts like a countdown timer//////////////////////////////////////////////////////////////////
      sleep 90;
      [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR HAS TAKEN 30% DAMAGE","PLAIN",3] call RE;
      sleep 100;
      [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR HAS TAKEN 50% DAMAGE","PLAIN",3] call RE;
      sleep 110;
      [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR HAS TAKEN 90% DAMAGE","PLAIN",3] call RE;
      uiSleep 120;
      [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR IS WEAK...TAKE HIM OUT NOW!!!","PLAIN",3] call RE;
      sleep 2;
       
      //Start ending Juggernaut///////////////////////////////////
      (vehicle player) addEventHandler ["handleDamage", { true }];    
      (vehicle player) removeAllEventHandlers "handleDamage";
      (vehicle player) allowDamage true;
      uiSleep 240;
      deleteVehicle PJ_grenade;
      END;
      Call it from your right click
      ["ItemObsidian","JUGGERNAUT","execVM 'scripts\Jugg.sqf';","true"], 
      marker.sqf:
      _unit = player;
      _nameP = name _unit;
      _markerobjp = createMarker [_namep,[0,0]];
      _markerobjp setMarkerShape "ICON";
      _markerobjp setMarkerType "mil_dot";
      _markerobjp setMarkerColor "ColorRed";
      _markerobjp setMarkerText _nameP;
      _markerobjp setMarkerSize [1,1];

      while {alive _unit} do {
      _markerobjp setmarkerdir (getdir _unit);
      _markerobjp setMarkerPos (getPos _unit);
      _markerobjp setMarkerText _nameP;
      sleep 5;
      };
      ////////////////////////////////////////////
      uiSleep 240;
      deleteMarker _markerobjp;
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...