Skip to content

Commit 254fa35

Browse files
committed
Action Rework
All actions are disabled, fixes starting weapons able to be fired and aimed with. Also included a binding set so the action to continue does not overlap with other actions.
1 parent 9253381 commit 254fa35

10 files changed

+115
-1770
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Assets {
2+
Id: 14031286742830150192
3+
Name: "Camera Orbit Animation Bindings"
4+
PlatformAssetType: 29
5+
SerializationVersion: 119
6+
VirtualFolderPath: "Camera Orbit Animation"
7+
BindingSetAsset {
8+
Bindings {
9+
BindingType {
10+
Value: "mc:ebindingtype:basic"
11+
}
12+
BasicBindingData {
13+
BasicInputs {
14+
KeyboardPrimary {
15+
Value: "mc:ebindingkeyboard:spacebar"
16+
}
17+
KeyboardSecondary {
18+
Value: "mc:ebindingkeyboard:leftclick"
19+
}
20+
Controller {
21+
Value: "mc:ebindinggamepad:a"
22+
}
23+
}
24+
}
25+
Action: "Main Menu"
26+
CoreBehavior {
27+
Value: "mc:ecorebehavior:none"
28+
}
29+
IsEnabledOnStart: true
30+
}
31+
}
32+
}

Data/BindingSets/Default Bindings.pbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Assets {
33
Name: "Default Bindings"
44
PlatformAssetType: 29
55
SerializationVersion: 119
6+
DirectlyPublished: true
67
BindingSetAsset {
78
Bindings {
89
BindingType {

Data/Scripts/CameraOrbit_Client.asset.pbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ Assets {
77
}
88
}
99
SerializationVersion: 119
10+
DirectlyPublished: true
11+
VirtualFolderPath: "Camera Orbit Animation"
1012
}

Data/Scripts/CameraOrbit_Client.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ local STATE_VISIBLE = 4
3131
local currentState
3232
local stateElapsedTime = 0
3333

34+
--Variables and Functions to enable/disable all actions
35+
local enabledActions = {}
36+
37+
local function DisableAllActions()
38+
for _, action in ipairs(Input.GetActions()) do
39+
if Input.IsActionEnabled(action) and action ~= ACTION_NAME then
40+
table.insert(enabledActions, action)
41+
Input.DisableAction(action)
42+
end
43+
end
44+
end
45+
46+
local function ReEnableActions()
47+
for _, action in ipairs(enabledActions) do
48+
Input.EnableAction(action)
49+
end
50+
end
51+
3452
--Blackout Functions
3553
local function SetUIOpacity(percent)
3654
BLACKOUT_UI.opacity = percent
@@ -92,6 +110,7 @@ local function OnActionPressed()
92110

93111
Events.BroadcastToServer("EnableMovement", LOCAL_PLAYER)
94112

113+
ReEnableActions()
95114
end
96115

97116
local function DisconnectActionEvent()
@@ -110,6 +129,8 @@ ACTION_EVENT = Input.actionPressedEvent:Connect(function(player, action, value)
110129
end)
111130

112131
--Initial Code
132+
DisableAllActions()
133+
113134
SetState(STATE_FADING_OUT)
114135

115136
UI_CONTAINER = World.SpawnAsset(ANIMATION_UI, {parent = PARENT})

Data/Scripts/CameraOrbit_README.asset.pbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ Assets {
77
}
88
}
99
SerializationVersion: 119
10+
DirectlyPublished: true
11+
VirtualFolderPath: "Camera Orbit Animation"
1012
}

Data/Scripts/CameraOrbit_Server.asset.pbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ Assets {
77
}
88
}
99
SerializationVersion: 119
10+
DirectlyPublished: true
11+
VirtualFolderPath: "Camera Orbit Animation"
1012
}

Data/Templates/Animation UI.pbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,4 +489,6 @@ Assets {
489489
}
490490
}
491491
SerializationVersion: 119
492+
DirectlyPublished: true
493+
VirtualFolderPath: "Camera Orbit Animation"
492494
}

Data/Templates/Camera Orbit Animation.pbt

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Assets {
1717
}
1818
ParentId: 4781671109827199097
1919
ChildIds: 8595810780840647339
20+
ChildIds: 1789148826009020676
2021
ChildIds: 9048535836852128335
2122
ChildIds: 10681609489107774144
2223
UnregisteredParameters {
@@ -48,7 +49,7 @@ Assets {
4849
}
4950
Overrides {
5051
Name: "cs:ActionName"
51-
String: "Jump"
52+
String: "Main Menu"
5253
}
5354
Overrides {
5455
Name: "cs:OrbitPosition:tooltip"
@@ -144,6 +145,43 @@ Assets {
144145
}
145146
IsReplicationEnabledByDefault: true
146147
}
148+
Objects {
149+
Id: 1789148826009020676
150+
Name: "Camera Orbit Animation Bindings"
151+
Transform {
152+
Location {
153+
}
154+
Rotation {
155+
}
156+
Scale {
157+
X: 1
158+
Y: 1
159+
Z: 1
160+
}
161+
}
162+
ParentId: 7967176572739956797
163+
Collidable_v2 {
164+
Value: "mc:ecollisionsetting:inheritfromparent"
165+
}
166+
Visible_v2 {
167+
Value: "mc:evisibilitysetting:inheritfromparent"
168+
}
169+
CameraCollidable {
170+
Value: "mc:ecollisionsetting:inheritfromparent"
171+
}
172+
EditorIndicatorVisibility {
173+
Value: "mc:eindicatorvisibility:visiblewhenselected"
174+
}
175+
BindingSet {
176+
BindingSetAsset {
177+
Id: 14031286742830150192
178+
}
179+
}
180+
NetworkRelevanceDistance {
181+
Value: "mc:eproxyrelevance:critical"
182+
}
183+
IsReplicationEnabledByDefault: true
184+
}
147185
Objects {
148186
Id: 9048535836852128335
149187
Name: "CameraOrbit_Server"
@@ -577,4 +615,6 @@ Assets {
577615
}
578616
}
579617
SerializationVersion: 119
618+
DirectlyPublished: true
619+
VirtualFolderPath: "Camera Orbit Animation"
580620
}

0 commit comments

Comments
 (0)