source: Studio/Player.tscn@ 5a9a237

sandbox
Last change on this file since 5a9a237 was 5a9a237, checked in by Kevin Chapman <victory2b@…>, 3 years ago

(WIP) Making it so a player can walk up stairs. Made Raycast for checking if feet connect, but body does not.

  • Property mode set to 100644
File size: 7.8 KB
Line 
1[gd_scene load_steps=14 format=2]
2
3[ext_resource path="res://Player.gd" type="Script" id=1]
4[ext_resource path="res://Textures/Crosshair/Crosshair.png" type="Texture" id=2]
5[ext_resource path="res://Textures/Interface/Man.png" type="Texture" id=3]
6[ext_resource path="res://Textures/Interface/FallDamage.png" type="Texture" id=4]
7[ext_resource path="res://Camera.gd" type="Script" id=5]
8[ext_resource path="res://Stats/staminabar.tres" type="Theme" id=6]
9[ext_resource path="res://Stats/lifeforcebar.tres" type="Theme" id=7]
10[ext_resource path="res://Stats/manabar.tres" type="Theme" id=8]
11[ext_resource path="res://Stats/xpbar.tres" type="Theme" id=9]
12[ext_resource path="res://Stats/healthbar.tres" type="Theme" id=10]
13
14[sub_resource type="CapsuleMesh" id=1]
15radius = 0.5
16
17[sub_resource type="CapsuleShape" id=2]
18radius = 0.5
19
20[sub_resource type="Animation" id=4]
21length = 0.6
22tracks/0/type = "value"
23tracks/0/path = NodePath("../HUD/Control/FallDamage:modulate")
24tracks/0/interp = 1
25tracks/0/loop_wrap = true
26tracks/0/imported = false
27tracks/0/enabled = true
28tracks/0/keys = {
29"times": PoolRealArray( 0, 0.2, 0.6 ),
30"transitions": PoolRealArray( 1, 1, 1 ),
31"update": 0,
32"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
33}
34
35[node name="Player" type="KinematicBody"]
36transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 8.25497, 0 )
37script = ExtResource( 1 )
38
39[node name="BodyMesh" type="MeshInstance" parent="."]
40transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 )
41mesh = SubResource( 1 )
42material/0 = null
43
44[node name="BodyCollison" type="CollisionShape" parent="."]
45transform = Transform( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0 )
46shape = SubResource( 2 )
47
48[node name="FootCheck" type="Spatial" parent="."]
49transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.75, 0 )
50
51[node name="zpray" type="RayCast" parent="FootCheck"]
52enabled = true
53cast_to = Vector3( 0, 0, 0.55 )
54
55[node name="znray" type="RayCast" parent="FootCheck"]
56enabled = true
57cast_to = Vector3( 0, 0, -0.55 )
58
59[node name="xpray" type="RayCast" parent="FootCheck"]
60enabled = true
61cast_to = Vector3( 0.55, 0, 0 )
62
63[node name="xnray" type="RayCast" parent="FootCheck"]
64enabled = true
65cast_to = Vector3( -0.55, 0, 0 )
66
67[node name="znxnray" type="RayCast" parent="FootCheck"]
68transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
69enabled = true
70cast_to = Vector3( -0.39, 0, -0.39 )
71
72[node name="zpxnray" type="RayCast" parent="FootCheck"]
73transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
74enabled = true
75cast_to = Vector3( -0.39, 0, 0.39 )
76
77[node name="znxpray" type="RayCast" parent="FootCheck"]
78transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
79enabled = true
80cast_to = Vector3( 0.39, 0, -0.39 )
81
82[node name="zpxpray" type="RayCast" parent="FootCheck"]
83transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
84enabled = true
85cast_to = Vector3( 0.39, 0, 0.39 )
86
87[node name="StepCheck" type="Spatial" parent="."]
88transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.45, 0 )
89
90[node name="zpray" type="RayCast" parent="StepCheck"]
91enabled = true
92cast_to = Vector3( 0, 0, 0.55 )
93
94[node name="znray" type="RayCast" parent="StepCheck"]
95enabled = true
96cast_to = Vector3( 0, 0, -0.55 )
97
98[node name="xpray" type="RayCast" parent="StepCheck"]
99enabled = true
100cast_to = Vector3( 0.55, 0, 0 )
101
102[node name="xnray" type="RayCast" parent="StepCheck"]
103enabled = true
104cast_to = Vector3( -0.55, 0, 0 )
105
106[node name="znxnray" type="RayCast" parent="StepCheck"]
107transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
108enabled = true
109cast_to = Vector3( -0.39, 0, -0.39 )
110
111[node name="zpxnray" type="RayCast" parent="StepCheck"]
112transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
113enabled = true
114cast_to = Vector3( -0.39, 0, 0.39 )
115
116[node name="znxpray" type="RayCast" parent="StepCheck"]
117transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
118enabled = true
119cast_to = Vector3( 0.39, 0, -0.39 )
120
121[node name="zpxpray" type="RayCast" parent="StepCheck"]
122transform = Transform( 0.997504, 0, -0.0706096, 0, 1, 0, 0.0706096, 0, 0.997504, 0, 0, 0 )
123enabled = true
124cast_to = Vector3( 0.39, 0, 0.39 )
125
126[node name="Head" type="Spatial" parent="."]
127transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.64, 0 )
128
129[node name="Camera" type="Camera" parent="Head"]
130script = ExtResource( 5 )
131
132[node name="AnimationPlayer" type="AnimationPlayer" parent="Head"]
133anims/FallDamage = SubResource( 4 )
134
135[node name="HUD" type="Control" parent="."]
136anchor_right = 1.0
137anchor_bottom = 1.0
138margin_left = 0.0867312
139margin_top = -1.22662
140margin_right = 4.08679
141margin_bottom = -1.22662
142__meta__ = {
143"_edit_use_anchors_": false
144}
145
146[node name="Crosshair" type="Control" parent="HUD"]
147anchor_left = 0.5
148anchor_top = 0.5
149anchor_right = 0.5
150anchor_bottom = 0.5
151margin_left = -21.0
152margin_top = -21.0
153margin_right = 21.0
154margin_bottom = 21.0
155__meta__ = {
156"_edit_use_anchors_": false
157}
158
159[node name="Crosshair_Image" type="TextureRect" parent="HUD/Crosshair"]
160anchor_right = 0.5
161anchor_bottom = 0.5
162margin_left = -1.12244
163margin_top = -1.12244
164margin_right = 38.8776
165margin_bottom = 38.8776
166texture = ExtResource( 2 )
167__meta__ = {
168"_edit_use_anchors_": false
169}
170
171[node name="Control" type="Control" parent="HUD"]
172anchor_top = 1.0
173anchor_right = 0.5
174anchor_bottom = 1.0
175margin_left = -0.445442
176margin_top = 542.0
177margin_right = -514.445
178margin_bottom = 542.0
179__meta__ = {
180"_edit_use_anchors_": false
181}
182
183[node name="Man" type="TextureRect" parent="HUD/Control"]
184light_mask = 2
185anchor_right = 0.5
186anchor_bottom = 0.5
187margin_left = 7.61129
188margin_top = -771.506
189margin_right = 109.611
190margin_bottom = -584.506
191texture = ExtResource( 3 )
192__meta__ = {
193"_edit_use_anchors_": false
194}
195
196[node name="FallDamage" type="TextureRect" parent="HUD/Control"]
197modulate = Color( 1, 1, 1, 0 )
198anchor_right = 0.5
199anchor_bottom = 0.5
200margin_left = 24.8588
201margin_top = -609.435
202margin_right = 92.8588
203margin_bottom = -583.435
204texture = ExtResource( 4 )
205__meta__ = {
206"_edit_use_anchors_": false
207}
208
209[node name="HealthBar" type="ProgressBar" parent="HUD/Control"]
210anchor_left = 2.0
211anchor_right = 2.0
212anchor_bottom = 1.0
213margin_left = 744.7
214margin_top = -614.977
215margin_right = 1007.7
216margin_bottom = -585.977
217theme = ExtResource( 10 )
218max_value = 101.6
219value = 100.0
220rounded = true
221percent_visible = false
222__meta__ = {
223"_edit_use_anchors_": false
224}
225
226[node name="StaminaBar" type="ProgressBar" parent="HUD/Control"]
227anchor_left = 2.0
228anchor_right = 2.0
229anchor_bottom = 1.0
230margin_left = 744.653
231margin_top = -649.119
232margin_right = 1007.65
233margin_bottom = -620.119
234size_flags_horizontal = 0
235theme = ExtResource( 6 )
236max_value = 101.6
237value = 100.0
238rounded = true
239percent_visible = false
240__meta__ = {
241"_edit_use_anchors_": false
242}
243
244[node name="ManaBar" type="ProgressBar" parent="HUD/Control"]
245anchor_left = 2.0
246anchor_right = 2.0
247anchor_bottom = 1.0
248margin_left = 744.653
249margin_top = -682.6
250margin_right = 1007.65
251margin_bottom = -653.6
252size_flags_horizontal = 0
253theme = ExtResource( 8 )
254max_value = 101.6
255value = 100.0
256rounded = true
257percent_visible = false
258__meta__ = {
259"_edit_use_anchors_": false
260}
261
262[node name="LifeforceBar" type="ProgressBar" parent="HUD/Control"]
263anchor_left = 2.0
264anchor_right = 2.0
265anchor_bottom = 1.0
266margin_left = 744.934
267margin_top = -580.881
268margin_right = 1007.93
269margin_bottom = -551.881
270size_flags_horizontal = 0
271theme = ExtResource( 7 )
272max_value = 101.6
273value = 100.0
274rounded = true
275percent_visible = false
276__meta__ = {
277"_edit_use_anchors_": false
278}
279
280[node name="XPBar" type="ProgressBar" parent="HUD/Control"]
281anchor_bottom = 0.5
282margin_left = 7.99913
283margin_top = -580.782
284margin_right = 109.999
285margin_bottom = -551.782
286size_flags_horizontal = 0
287theme = ExtResource( 9 )
288max_value = 105.0
289rounded = true
290percent_visible = false
291__meta__ = {
292"_edit_use_anchors_": false
293}
Note: See TracBrowser for help on using the repository browser.