Add Metal Drawbridge

Model made by @Helion4
This commit is contained in:
AirwavesMan
2020-11-29 18:25:08 +01:00
parent ce278ba6e7
commit 5e281cfc7b
8 changed files with 208 additions and 4 deletions

View File

@@ -219,6 +219,50 @@ class cinder_gate_kit_locked: CA_Magazine
};
};
class metal_drawbridge_kit: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_METALDRAWBRIDGE;
descriptionShort = $STR_EPOCH_METALDRAWBRIDGE_DESC;
model = "\z\addons\dayz_epoch\models\supply_crate.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_wooden_crate_ca.paa";
class ItemActions
{
class Build
{
text = $STR_ACTIONS_BUILD;
script = "spawn player_build;";
require[] = {"ItemToolbox"};
create = "Metal_Drawbridge_DZ";
};
};
};
class metal_drawbridge_kit_locked: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_METALDRAWBRIDGELOCKED;
descriptionShort = $STR_EPOCH_METALDRAWBRIDGELOCKED_DESC;
model = "\z\addons\dayz_epoch\models\supply_crate.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_wooden_crate_ca.paa";
class ItemActions
{
class Build
{
text = $STR_ACTIONS_BUILD;
script = "spawn player_build;";
require[] = {"ItemToolbox"};
create = "Metal_DrawbridgeLocked_DZ";
};
};
};
class ItemWoodFloor: CA_Magazine
{

View File

@@ -133,6 +133,19 @@ class ItemRSJ: CA_Magazine
picture = "\z\addons\dayz_buildings\equip\item_rsj.paa";
model = "z\addons\dayz_buildings\models\rsj.p3d";
descriptionShort = $STR_BLD_desc_ItemRSJ;//"Steel RSJ Support Beam"
class ItemActions
{
class Crafting
{
text = $STR_EPOCH_ACTION_CRAFT_BRIDGE;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"workshop","fire"};
requiretools[] = {"ItemToolbox","ItemCrowbar","ItemSledge"};
output[] = {{"metal_drawbridge_kit",1}};
input[] = {{"ItemRSJ",6},{"metal_floor_kit",2}};
};
};
};
class equip_1inch_metal_pipe : CA_Magazine

View File

@@ -0,0 +1,105 @@
class Metal_Drawbridge_DZ: CinderWallDoor_DZ_Base
{
scope = 2;
model = "\z\addons\dayz_epoch_v\base_building\wood\draw_bridge\wood_draw_bridge.p3d";
displayName = $STR_EPOCH_METALDRAWBRIDGE;
GhostPreview = "Drawbridge_Preview_DZ";
offset[] = {0,2.5,0};
upgradeBuilding[] = {"Metal_DrawbridgeLocked_DZ",{},{{"ItemComboLock",1}}};
class AnimationSources {
class Open_inner {
source = "user";
animPeriod = 4;
initPhase = 0;
};
class Open_outer {
source = "user";
animPeriod = 4;
initPhase = 0;
};
};
class UserActions
{
class Open_inner
{
displayName = $STR_EPOCH_ACTION_LOWER_BRIDGE;
onlyforplayer = true;
position = "Door_knopf";
radius = 3;
condition = "this animationPhase ""Open_inner"" < 0.5";
statement = "this animate [""Open_inner"", 1];this animate [""Open_outer"", 1];";
};
class Close_Door : Open_inner
{
displayName = $STR_EPOCH_ACTION_RAISE_BRIDGE;
condition = "this animationPhase ""Open_inner"" >= 0.5";
statement = "this animate [""Open_inner"", 0];this animate [""Open_outer"", 0];";
};
};
};
class Metal_DrawbridgeLocked_DZ: CinderWallDoorLocked_DZ_Base
{
scope = 2;
model = "\z\addons\dayz_epoch_v\base_building\wood\draw_bridge\wood_draw_bridge_locked.p3d";
displayName = $STR_EPOCH_METALDRAWBRIDGELOCKED;
GhostPreview = "Drawbridge_Preview_DZ";
offset[] = {0,2.5,0};
downgradeBuilding[] = {"Metal_Drawbridge_DZ",{{"ItemComboLock",1}}};
class AnimationSources
{
class Open_inner
{
source = "user";
animPeriod = 4;
initPhase = 0;
};
class Open_outer
{
source = "user";
animPeriod = 4;
initPhase = 0;
};
class Open_latch
{
source = "user";
animPeriod = 1;
initPhase = 0;
};
};
class UserActions
{
class Open_inner
{
displayName = $STR_EPOCH_ACTION_LOWER_BRIDGE;
onlyforplayer = true;
position = "Door_knopf";
radius = 3;
condition = "(this animationPhase ""Open_inner"" == 0) && (this animationPhase ""Open_latch"" == 1)";
statement = "this animate [""Open_inner"", 1];this animate [""Open_outer"", 1];";
};
class Close_Door : Open_inner
{
displayName = $STR_EPOCH_ACTION_RAISE_BRIDGE;
condition = "(this animationPhase ""Open_inner"" == 1) && (this animationPhase ""Open_latch"" == 1)";
statement = "this animate [""Open_inner"", 0];this animate [""Open_outer"", 0];";
};
class Lock_Door : Open_inner
{
displayName = $STR_EPOCH_ACTION_LOCK_BRIDGE;
condition = "(this animationPhase ""Open_outer"" == 0) and (this animationPhase ""Open_latch"" == 1)";
statement = "PVDZE_handleSafeGear = [player,this,4];publicVariableServer ""PVDZE_handleSafeGear"";this animate [""Open_latch"", 0]";
};
class Unlock_Door : Open_inner
{
displayName = $STR_EPOCH_ACTION_UNLOCK_BRIDGE;
condition = "(!keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_outer"" == 0) and (this animationPhase ""Open_latch"" == 0)";
statement = "this animate [""Open_latch"", 1];PVDZE_handleSafeGear = [player,this,5,DZE_Lock_Door];publicVariableServer ""PVDZE_handleSafeGear"";";
};
class Unlock_Door_Dialog : Open_inner
{
displayName = $STR_EPOCH_ACTION_UNLOCK_BRIDGE;
condition = "!keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
statement = "dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
};
};
};

View File

@@ -129,4 +129,9 @@ class CinderGate_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
model = "\z\addons\dayz_epoch_v\base_building\cinder\cinder_high_garage\high_steel_garage_frame_ghost.p3d";
displayName = "Cinder Gate Preview";
};
class Drawbridge_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
model="z\addons\dayz_epoch_v\base_building\wood\draw_bridge\wood_draw_bridge_ghost.p3d";
displayName = "Metal Drawbridge Preview";
};

View File

@@ -486,6 +486,7 @@ class CfgVehicles
#include "Buildables\Traps.hpp"
#include "Buildables\Generator.hpp"
#include "Buildables\Doors.hpp"
#include "Buildables\Bridges.hpp"
#include "Buildables\ModularBuilding.hpp"
#include "Buildables\ModularWrecks.hpp"
#include "Buildables\FencesWood.hpp"