| … | … | @@ -0,0 +1,15 @@ |
| 1 | [remap] | |
| 2 | ||
| 3 | importer="mp3" | |
| 4 | type="AudioStreamMP3" | |
| 5 | path="res://.import/teleport_1.mp3-61298d92ecf3ab492b62616d5364faec.mp3str" | |
| 6 | ||
| 7 | [deps] | |
| 8 | ||
| 9 | source_file="res://assets/sounds/player/teleport_1.mp3" | |
| 10 | dest_files=[ "res://.import/teleport_1.mp3-61298d92ecf3ab492b62616d5364faec.mp3str" ] | |
| 11 | ||
| 12 | [params] | |
| 13 | ||
| 14 | loop=false | |
| 15 | loop_offset=0 |
| … | … | @@ -3,7 +3,6 @@ extends Spatial |
| 3 | 3 | export var teleportation_destination : String = "map_test" |
| 4 | 4 | |
| 5 | 5 | onready var mapsNode : Node = get_tree().get_current_scene().get_node("Maps") |
| 6 | onready var currentMapNode : Node = get_tree().get_current_scene().get_node("Maps").get_child(0) | |
| 7 | 6 | |
| 8 | 7 | |
| 9 | 8 | # Declare member variables here. Examples: |
| … | … | @@ -20,23 +19,18 @@ func _on_Teleporter_gameplay_entered(): |
| 20 | 19 | |
| 21 | 20 | |
| 22 | 21 | func tryMapChange(mapChangeName : String, sendGossip : bool, playerNode): |
| 23 | var mapCurrentName = currentMapNode.name | |
| 22 | var mapCurrentName = playerNode.currentMap.map_name | |
| 24 | 23 | var mapNode = null |
| 25 | 24 | if(mapCurrentName != teleportation_destination): |
| 26 | currentMapNode.queue_free() | |
| 27 | 25 | if(mapChangeName == "map_test"): |
| 28 | print("") | |
| 29 | mapNode = get_tree().get_current_scene().map_test | |
| 26 | mapNode = mapsNode.find_node("map_test", true, false) | |
| 30 | 27 | elif(mapChangeName == "map_cyber"): |
| 31 | print("") | |
| 32 | mapNode = get_tree().get_current_scene().map_cyber | |
| 28 | mapNode = mapsNode.find_node("map_cyber", true, false) | |
| 33 | 29 | elif(mapChangeName == "map_cyber1"): |
| 34 | print("") | |
| 35 | mapNode = get_tree().get_current_scene().map_cyber1 | |
| 36 | var newMap = mapNode.instance() | |
| 37 | mapsNode.add_child(newMap) | |
| 30 | mapNode = mapsNode.find_node("map_cyber1", true, false) | |
| 38 | 31 | # Find a Respawn Point |
| 39 | playerNode.currentSpawnLocation = playerNode.getSpawnLocation() | |
| 32 | playerNode.currentSpawnLocation = playerNode.getSpawnLocationForMapName(mapChangeName) | |
| 33 | playerNode.currentMap = mapNode | |
| 40 | 34 | playerNode.playerWantsToRespawn = true |
| 41 | 35 | |
| 42 | 36 | if(sendGossip): |
| … | … | @@ -2,6 +2,8 @@ extends Spatial |
| 2 | 2 | |
| 3 | 3 | onready var playerSpawnNodes : Node = find_node("PlayerSpawnNodes") |
| 4 | 4 | |
| 5 | export var map_name : String = "" | |
| 6 | ||
| 5 | 7 | func _ready(): |
| 6 | 8 | randomize() |
| 7 | 9 | addGrapplingHookCollisionMaskToMap() |
| … | … | @@ -12,7 +14,7 @@ func _process(_delta): |
| 12 | 14 | func getSpawnLocation() -> Vector3: |
| 13 | 15 | var childCount : int = playerSpawnNodes.get_child_count() |
| 14 | 16 | var spawnNode : Spatial = playerSpawnNodes.get_child( randi() % childCount ) |
| 15 | return spawnNode.translation | |
| 17 | return spawnNode.global_transform.origin | |
| 16 | 18 | |
| 17 | 19 | func addGrapplingHookCollisionMaskToMap(): |
| 18 | 20 | var _name = self.name |
| … | … | @@ -31,3 +33,10 @@ func checkAndSetChildrenGrapplingHookMask(var _Node, indentLevel : int): |
| 31 | 33 | var childCount = _Node.get_child_count() |
| 32 | 34 | for i in range(childCount): |
| 33 | 35 | checkAndSetChildrenGrapplingHookMask(_Node.get_child(i), indentLevel + 1) |
| 36 | ||
| 37 | ||
| 38 | func _on_Area_body_entered(body, map_name): | |
| 39 | if(body is KinematicBody): | |
| 40 | var mapNode = get_tree().get_current_scene().find_node(map_name, true, false) | |
| 41 | body.currentMap = mapNode | |
| 42 |
| … | … | @@ -46,6 +46,7 @@ glow_hdr_scale = 1.16 |
| 46 | 46 | |
| 47 | 47 | [node name="map_test" type="Spatial"] |
| 48 | 48 | script = ExtResource( 2 ) |
| 49 | map_name = "map_test" | |
| 49 | 50 | |
| 50 | 51 | [node name="asset_map_test" parent="." instance=ExtResource( 1 )] |
| 51 | 52 | |
| … | … | @@ -88,3 +89,5 @@ transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -9.88113, 8.96284, -17.1 |
| 88 | 89 | [node name="CollisionShape" type="CollisionShape" parent="Area"] |
| 89 | 90 | transform = Transform( 30, 0, 0, 0, 30, 0, 0, 0, 80, 0, 0, -23.7039 ) |
| 90 | 91 | shape = SubResource( 35 ) |
| 92 | ||
| 93 | [connection signal="body_entered" from="Area" to="." method="_on_Area_body_entered" binds= [ "map_test" ]] |
| … | … | @@ -37,7 +37,7 @@ onready var meshCollisionShape : CollisionShape = $CollisionShape |
| 37 | 37 | onready var grappleHookCast : RayCast = $CameraHead/CameraPivot/GrappleHookCast |
| 38 | 38 | |
| 39 | 39 | onready var grappleVisualPoint_1 = $GrapplingHook/GrappleVisualPoint_1 |
| 40 | onready var grappleVisualPoint_2 = $GrapplingHook/GrappleVisualPoint_2 | |
| 40 | # onready var grappleVisualPoint_2 = $GrapplingHook/GrappleVisualPoint_2 | |
| 41 | 41 | onready var grappleVisualPoint = grappleVisualPoint_1 |
| 42 | 42 | |
| 43 | 43 | onready var grappleLineHelper : Spatial = $Model/GrappleLineHelper |
| … | … | @@ -57,7 +57,7 @@ var playerWantsToReleaseGrapplingHook : bool = false |
| 57 | 57 | #onready var hyperdebugui_gateway_startstop_button : Button = $HyperGodotDebugUI/HypercoreDebugPanel/HypercoreDebugContainer/GatewayStartStopButton |
| 58 | 58 | #onready var hyperdebugui_gossipid_list : ItemList = get_tree().get_current_scene().get_node("HyperGodot").get_node("HyperGateway") |
| 59 | 59 | |
| 60 | var currentMap = null | |
| 60 | onready var currentMap = get_tree().get_current_scene().get_node("Maps").get_child(0) | |
| 61 | 61 | var originalOrigin : Vector3 = Vector3.ZERO |
| 62 | 62 | var currentSpawnLocation : Vector3 = Vector3.ZERO |
| 63 | 63 | |
| … | … | @@ -81,14 +81,11 @@ var collisions : Dictionary = {} |
| 81 | 81 | var Particles_Land = preload("res://game/player/particles.tscn") |
| 82 | 82 | |
| 83 | 83 | func _ready(): |
| 84 | # Get Current Map | |
| 85 | currentMap = get_tree().get_current_scene().get_node("Maps").get_child(0) | |
| 86 | ||
| 87 | 84 | # Backup Origin |
| 88 | 85 | originalOrigin = self.translation |
| 89 | 86 | |
| 90 | 87 | # Spawn into Map |
| 91 | currentSpawnLocation = getSpawnLocation() | |
| 88 | currentSpawnLocation = getSpawnLocationForMapName(currentMap.map_name) | |
| 92 | 89 | playerWantsToRespawn = true |
| 93 | 90 | |
| 94 | 91 | # Get HyperGossip |
| … | … | @@ -102,9 +99,13 @@ func snapShotUpdate(_translation : Vector3, _meshDirection : Vector3, _lookingDi |
| 102 | 99 | func directionUpdate(_direction : Vector3): |
| 103 | 100 | self.currentDirection = _direction |
| 104 | 101 | |
| 105 | func getSpawnLocation() -> Vector3: | |
| 106 | return get_tree().get_current_scene().getSpawnLocation() | |
| 107 | ||
| 102 | func getSpawnLocationForMapName(mapName : String) -> Vector3: | |
| 103 | # Get Map Node | |
| 104 | var mapNode = get_tree().get_current_scene().get_node("Maps").find_node(mapName, true, false) | |
| 105 | if(mapNode == null): | |
| 106 | return get_tree().get_current_scene().get_node("Maps").find_node("map_test", true, false).getSpawnLocation() | |
| 107 | else: | |
| 108 | return mapNode.getSpawnLocation() | |
| 108 | 109 | |
| 109 | 110 | func _process(_delta): |
| 110 | 111 | if(currentDirection != Vector3.ZERO): |
| … | … | @@ -289,7 +290,8 @@ func respawnPlayer(): |
| 289 | 290 | grapplingHook_IsHooked = false |
| 290 | 291 | playerWantsToShootGrapplingHook = false |
| 291 | 292 | playerWantsToReleaseGrapplingHook = true |
| 292 | global_transform.origin = get_tree().get_current_scene().getSpawnLocation() | |
| 293 | $Model/Sound_Teleport_1.play() | |
| 294 | global_transform.origin = currentSpawnLocation | |
| 293 | 295 | # translation = ( get_tree().get_current_scene().getSpawnLocation() )# ) = currentSpawnLocation |
| 294 | 296 | |
| 295 | 297 | func playerCanJump() -> bool: |
| … | … | @@ -336,7 +338,7 @@ func _on_Input_player_move(direction : Vector3): |
| 336 | 338 | |
| 337 | 339 | func _on_Input_player_restore_origin() -> void: |
| 338 | 340 | playerWantsToRespawn = true |
| 339 | var spawnLocation : Vector3 = getSpawnLocation() | |
| 341 | var spawnLocation : Vector3 = getSpawnLocationForMapName(currentMap.map_name) | |
| 340 | 342 | currentSpawnLocation = spawnLocation |
| 341 | 343 | |
| 342 | 344 | var data : Dictionary = { |
| … | … | @@ -1,4 +1,4 @@ |
| 1 | [gd_scene load_steps=35 format=2] | |
| 1 | [gd_scene load_steps=36 format=2] | |
| 2 | 2 | |
| 3 | 3 | [ext_resource path="res://assets/models/tumble/model_tumble.tscn" type="PackedScene" id=1] |
| 4 | 4 | [ext_resource path="res://assets/models/tumble/tumble/sprint-loop.tres" type="Animation" id=2] |
| … | … | @@ -32,6 +32,7 @@ |
| 32 | 32 | [ext_resource path="res://assets/sounds/player/release_grapplinghook.wav" type="AudioStream" id=30] |
| 33 | 33 | [ext_resource path="res://assets/sounds/player/generic_robot_land.wav" type="AudioStream" id=31] |
| 34 | 34 | [ext_resource path="res://assets/sounds/player/fire_grapplinghook1.mp3" type="AudioStream" id=32] |
| 35 | [ext_resource path="res://assets/sounds/player/teleport_1.mp3" type="AudioStream" id=33] | |
| 35 | 36 | [ext_resource path="res://game/player/grappling_hook/gh_visual_line_1.tscn" type="PackedScene" id=34] |
| 36 | 37 | |
| 37 | 38 | [sub_resource type="CylinderShape" id=1] |
| … | … | @@ -81,6 +82,11 @@ attenuation_filter_cutoff_hz = 20500.0 |
| 81 | 82 | stream = ExtResource( 30 ) |
| 82 | 83 | attenuation_filter_cutoff_hz = 20500.0 |
| 83 | 84 | |
| 85 | [node name="Sound_Teleport_1" type="AudioStreamPlayer3D" parent="Model"] | |
| 86 | transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0, 0 ) | |
| 87 | stream = ExtResource( 33 ) | |
| 88 | attenuation_filter_cutoff_hz = 20500.0 | |
| 89 | ||
| 84 | 90 | [node name="GrappleLineHelper" type="Spatial" parent="Model"] |
| 85 | 91 | transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0.753, 0 ) |
| 86 | 92 |
| … | … | @@ -1,7 +1,8 @@ |
| 1 | 1 | extends Control |
| 2 | 2 | |
| 3 | onready var playerNode = get_node("../../../Players/PlayerLocal") | |
| 4 | onready var currentMapNode : Node = get_tree().get_current_scene().get_node("CurrentMap") | |
| 3 | onready var playerNode = get_tree().get_current_scene().get_node("Players").get_node("PlayerLocal") | |
| 4 | ||
| 5 | onready var currentmapValue : Label = $Panel/MarginContainer/GridContainer/Current_Map_Value | |
| 5 | 6 | onready var inputValue : Label = $Panel/MarginContainer/GridContainer/Input_Value |
| 6 | 7 | onready var velocityValue : Label = $Panel/MarginContainer/GridContainer/Velocity_Value |
| 7 | 8 | onready var speedValue : Label = $Panel/MarginContainer/GridContainer/Speed_Value |
| … | … | @@ -26,6 +27,7 @@ func _ready(): |
| 26 | 27 | hyperGossip = get_tree().get_current_scene().get_node("HyperGodot").get_node("HyperGossip") |
| 27 | 28 | |
| 28 | 29 | func _process(_delta): |
| 30 | currentmapValue.text = String(playerNode.currentMap.map_name) | |
| 29 | 31 | inputValue.text = String(playerNode.currentDirection) |
| 30 | 32 | velocityValue.text = String(playerNode.kinematicVelocity) |
| 31 | 33 | speedValue.text = String(playerNode.currentSpeed) |
| … | … | @@ -77,7 +79,7 @@ func tryMapChange(mapChangeName : String, sendGossip : bool): |
| 77 | 79 | elif(mapChangeName == "map_cyber1"): |
| 78 | 80 | mapNode = get_tree().get_current_scene().map_cyber1 |
| 79 | 81 | var newMap = mapNode.instance() |
| 80 | currentMapNode.add_child(newMap) | |
| 82 | #currentMapNode.add_child(newMap) | |
| 81 | 83 | # Update Current Map |
| 82 | 84 | playerNode.currentMap = get_tree().get_current_scene().get_node("CurrentMap").get_child(1) |
| 83 | 85 | # Update Actual Map |
| … | … | @@ -16,7 +16,7 @@ script = ExtResource( 1 ) |
| 16 | 16 | margin_left = 10.0 |
| 17 | 17 | margin_top = 12.0 |
| 18 | 18 | margin_right = 333.0 |
| 19 | margin_bottom = 92.0 | |
| 19 | margin_bottom = 112.0 | |
| 20 | 20 | mouse_filter = 2 |
| 21 | 21 | custom_styles/panel = SubResource( 1 ) |
| 22 | 22 | |
| … | … | @@ -32,88 +32,108 @@ __meta__ = { |
| 32 | 32 | |
| 33 | 33 | [node name="GridContainer" type="GridContainer" parent="Panel/MarginContainer"] |
| 34 | 34 | margin_right = 143.0 |
| 35 | margin_bottom = 68.0 | |
| 35 | margin_bottom = 86.0 | |
| 36 | 36 | mouse_filter = 2 |
| 37 | 37 | columns = 2 |
| 38 | 38 | __meta__ = { |
| 39 | 39 | "_edit_use_anchors_": false |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | [node name="Input" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 43 | margin_right = 63.0 | |
| 42 | [node name="Current_Map" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 43 | margin_right = 77.0 | |
| 44 | 44 | margin_bottom = 14.0 |
| 45 | text = "Input :" | |
| 46 | align = 2 | |
| 45 | text = "Map Name :" | |
| 47 | 46 | __meta__ = { |
| 48 | 47 | "_edit_use_anchors_": false |
| 49 | 48 | } |
| 50 | 49 | |
| 51 | [node name="Input_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 52 | margin_left = 67.0 | |
| 53 | margin_right = 67.0 | |
| 50 | [node name="Current_Map_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 51 | margin_left = 81.0 | |
| 52 | margin_right = 105.0 | |
| 54 | 53 | margin_bottom = 14.0 |
| 54 | text = "N/A" | |
| 55 | 55 | __meta__ = { |
| 56 | 56 | "_edit_use_anchors_": false |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | [node name="Velocity" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 59 | [node name="Input" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 60 | 60 | margin_top = 18.0 |
| 61 | margin_right = 63.0 | |
| 61 | margin_right = 77.0 | |
| 62 | 62 | margin_bottom = 32.0 |
| 63 | text = "Velocity :" | |
| 63 | text = "Input :" | |
| 64 | 64 | align = 2 |
| 65 | 65 | __meta__ = { |
| 66 | 66 | "_edit_use_anchors_": false |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | [node name="Velocity_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 70 | margin_left = 67.0 | |
| 69 | [node name="Input_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 70 | margin_left = 81.0 | |
| 71 | 71 | margin_top = 18.0 |
| 72 | margin_right = 67.0 | |
| 72 | margin_right = 105.0 | |
| 73 | 73 | margin_bottom = 32.0 |
| 74 | 74 | __meta__ = { |
| 75 | 75 | "_edit_use_anchors_": false |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | [node name="Speed" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 78 | [node name="Velocity" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 79 | 79 | margin_top = 36.0 |
| 80 | margin_right = 63.0 | |
| 80 | margin_right = 77.0 | |
| 81 | 81 | margin_bottom = 50.0 |
| 82 | text = "Speed :" | |
| 82 | text = "Velocity :" | |
| 83 | 83 | align = 2 |
| 84 | 84 | __meta__ = { |
| 85 | 85 | "_edit_use_anchors_": false |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | [node name="Speed_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 89 | margin_left = 67.0 | |
| 88 | [node name="Velocity_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 89 | margin_left = 81.0 | |
| 90 | 90 | margin_top = 36.0 |
| 91 | margin_right = 67.0 | |
| 91 | margin_right = 105.0 | |
| 92 | 92 | margin_bottom = 50.0 |
| 93 | 93 | __meta__ = { |
| 94 | 94 | "_edit_use_anchors_": false |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | [node name="OnFloor" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 97 | [node name="Speed" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 98 | 98 | margin_top = 54.0 |
| 99 | margin_right = 63.0 | |
| 99 | margin_right = 77.0 | |
| 100 | 100 | margin_bottom = 68.0 |
| 101 | text = "On Floor :" | |
| 101 | text = "Speed :" | |
| 102 | 102 | align = 2 |
| 103 | 103 | __meta__ = { |
| 104 | 104 | "_edit_use_anchors_": false |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | [node name="OnFloor_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 108 | margin_left = 67.0 | |
| 107 | [node name="Speed_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 108 | margin_left = 81.0 | |
| 109 | 109 | margin_top = 54.0 |
| 110 | margin_right = 67.0 | |
| 110 | margin_right = 105.0 | |
| 111 | 111 | margin_bottom = 68.0 |
| 112 | 112 | __meta__ = { |
| 113 | 113 | "_edit_use_anchors_": false |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | [node name="OnFloor" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 117 | margin_top = 72.0 | |
| 118 | margin_right = 77.0 | |
| 119 | margin_bottom = 86.0 | |
| 120 | text = "On Floor :" | |
| 121 | align = 2 | |
| 122 | __meta__ = { | |
| 123 | "_edit_use_anchors_": false | |
| 124 | } | |
| 125 | ||
| 126 | [node name="OnFloor_Value" type="Label" parent="Panel/MarginContainer/GridContainer"] | |
| 127 | margin_left = 81.0 | |
| 128 | margin_top = 72.0 | |
| 129 | margin_right = 105.0 | |
| 130 | margin_bottom = 86.0 | |
| 131 | __meta__ = { | |
| 132 | "_edit_use_anchors_": false | |
| 133 | } | |
| 134 | ||
| 116 | 135 | [node name="Panel2" type="Panel" parent="."] |
| 136 | visible = false | |
| 117 | 137 | margin_left = 10.0 |
| 118 | 138 | margin_top = 127.0 |
| 119 | 139 | margin_right = 333.0 |
| … | … | @@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 ) |
| 187 | 187 | nodes/walk_scale/position = Vector2( -640, 360 ) |
| 188 | 188 | nodes/wall_run/node = SubResource( 50 ) |
| 189 | 189 | nodes/wall_run/position = Vector2( 720, -60 ) |
| 190 | node_connections = [ "output", 0, "wall_run", "TimeScale 3", 0, "strafe", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "falling_scale", 0, "Animation 6", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "jump_scale", 0, "jump", "landing_scale", 0, "Animation 7", "roll", 0, "air_transition", "roll", 1, "roll_scale", "roll_scale", 0, "Animation", "run_scale", 0, "Animation 4", "walk_scale", 0, "Animation 3", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll" ] | |
| 190 | node_connections = [ "output", 0, "wall_run", "landing_scale", 0, "Animation 7", "TimeScale 3", 0, "strafe", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "jump_scale", 0, "jump", "roll", 0, "air_transition", "roll", 1, "roll_scale", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "run_scale", 0, "Animation 4", "roll_scale", 0, "Animation", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "falling_scale", 0, "Animation 6", "walk_scale", 0, "Animation 3", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll" ] |
| … | … | @@ -1,31 +1,19 @@ |
| 1 | 1 | extends Node |
| 2 | 2 | |
| 3 | onready var map_test = preload("res://game/maps/map_test/map_test.tscn") | |
| 4 | onready var map_cyber = preload("res://game/maps/map_cyber/map_cyber.tscn") | |
| 5 | onready var map_cyber1 = preload("res://game/maps/map_cyber1/map_cyber1.scn") | |
| 3 | export(NodePath) var MAP_TEST : NodePath | |
| 4 | export(NodePath) var map_cyber : NodePath | |
| 5 | export(NodePath) var map_cyber1 : NodePath | |
| 6 | 6 | |
| 7 | # Declare member variables here. Examples: | |
| 8 | # var a = 2 | |
| 9 | # var b = "text" | |
| 10 | ||
| 11 | func fartPussy(): | |
| 12 | pass | |
| 13 | ||
| 14 | ||
| 15 | # Called when the node enters the scene tree for the first time. | |
| 16 | 7 | func _ready(): |
| 17 | pass # Replace with function body. | |
| 8 | pass | |
| 18 | 9 | |
| 19 | 10 | |
| 20 | # Called every frame. 'delta' is the elapsed time since the previous frame. | |
| 21 | #func _process(delta): | |
| 22 | # pass | |
| 11 | func _process(delta): | |
| 12 | pass | |
| 23 | 13 | |
| 24 | func getSpawnLocation() -> Vector3: | |
| 14 | func getSpawnLocation(bodyNode, mapNode) -> Vector3: | |
| 25 | 15 | # Get Number of Maps |
| 26 | 16 | var childCount : int = self.get_child(0).get_child_count() |
| 27 | # Get Random Map | |
| 28 | var mapNode = self.get_child(0).get_child( randi() % childCount ) | |
| 29 | 17 | |
| 30 | 18 | # Get Random Spawn Location from Map |
| 31 | 19 | var playerSpawnNodes = mapNode.find_node("PlayerSpawnNodes", true, false) |
| … | … | @@ -12,6 +12,9 @@ |
| 12 | 12 | |
| 13 | 13 | [node name="Main" type="Node"] |
| 14 | 14 | script = ExtResource( 7 ) |
| 15 | MAP_TEST = NodePath("Maps/map_test") | |
| 16 | map_cyber = NodePath("Maps/map_cyber") | |
| 17 | map_cyber1 = NodePath("Maps/map_cyber1") | |
| 15 | 18 | |
| 16 | 19 | [node name="Maps" type="Node" parent="."] |
| 17 | 20 | |
| … | … | @@ -20,9 +23,11 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 82.6497, 0, 204.33 ) |
| 20 | 23 | |
| 21 | 24 | [node name="map_cyber" parent="Maps" instance=ExtResource( 9 )] |
| 22 | 25 | transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 132.051, 0, -243 ) |
| 26 | map_name = "map_cyber" | |
| 23 | 27 | |
| 24 | 28 | [node name="map_cyber1" parent="Maps" instance=ExtResource( 8 )] |
| 25 | 29 | transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 357.971, 3.8147e-06, 43.2013 ) |
| 30 | map_name = "map_cyber1" | |
| 26 | 31 | |
| 27 | 32 | [node name="Players" type="Node" parent="."] |
| 28 | 33 |