mini tweaks to item drops. still needs overhaul
This commit is contained in:
@@ -466,6 +466,7 @@ transform = Transform3D(0.978226, 0.207541, 0, -0.207541, 0.978226, 0, 0, 0, 1,
|
||||
|
||||
[node name="armStandin" type="MeshInstance3D" parent="mac10" index="8"]
|
||||
transform = Transform3D(-1.20667e-05, 0, 3.33333, 0, 3.33333, 0, -3.33333, 0, -1.20667e-05, 1.48458, -0.467889, 0.0751227)
|
||||
visible = false
|
||||
mesh = SubResource("BoxMesh_3phrt")
|
||||
skeleton = NodePath("../../../../../..")
|
||||
|
||||
|
||||
@@ -527,6 +527,7 @@ spot_angle_attenuation = 0.353554
|
||||
|
||||
[node name="armStandin" type="MeshInstance3D" parent="revolver1" index="6"]
|
||||
transform = Transform3D(2.01151e-05, -5.55667, -1.75852e-12, -5.55667, -2.01151e-05, 4.85779e-07, -4.85779e-07, 0, -5.55667, 0.502168, 0.0410088, 2.79972)
|
||||
visible = false
|
||||
mesh = SubResource("BoxMesh_7fcc1")
|
||||
skeleton = NodePath("../../../../../../../..")
|
||||
|
||||
|
||||
@@ -490,6 +490,7 @@ skeleton = NodePath("")
|
||||
|
||||
[node name="armStandin" type="MeshInstance3D" parent="rocketlauncher1"]
|
||||
transform = Transform3D(-1.667, -1.45734e-07, 2.6077e-08, -2.6077e-08, -7.28669e-08, -1.667, 1.45734e-07, -1.667, 7.28714e-08, 0.298684, 0.50374, 0.0300984)
|
||||
visible = false
|
||||
mesh = SubResource("BoxMesh_scq3u")
|
||||
skeleton = NodePath("../../../../../../..")
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="First Person Test"
|
||||
run/main_scene="res://scenes/enemy_working_scene.tscn"
|
||||
run/main_scene="res://scenes/test_level_2v2.tscn"
|
||||
config/features=PackedStringArray("4.3", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
extends SubViewport
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
@@ -7,7 +7,6 @@ extends RigidBody3D
|
||||
|
||||
@onready var level_control = get_tree().current_scene
|
||||
|
||||
var rng = RandomNumberGenerator.new()
|
||||
var rand_amt
|
||||
var player_follow
|
||||
var player
|
||||
@@ -18,8 +17,7 @@ func _ready():
|
||||
add_to_group("spawned")
|
||||
#find player
|
||||
player = level_control.player
|
||||
|
||||
rand_amt = rng.randi_range(25,100)
|
||||
rand_amt = randi_range(25,100)
|
||||
|
||||
if despawning == true:
|
||||
await get_tree().create_timer(despawn_time_s).timeout
|
||||
@@ -33,12 +31,14 @@ func _physics_process(delta):
|
||||
self.set_linear_velocity(float_direction * 7)
|
||||
|
||||
func picked_up():
|
||||
player.pickup_sound.pitch_scale = 1 + rng.randf_range(-.3,.3)
|
||||
player.pickup_sound.pitch_scale = 1 + randf_range(-.3,.3)
|
||||
player.pickup_sound.play()
|
||||
match pickupType:
|
||||
# Ammo
|
||||
0:
|
||||
level_control.ammo_reserve[level_control.current_gun_index] += clamp((rand_amt/100) * player.gun.max_ammo, 1, player.gun.max_ammo)
|
||||
var ammo_add_amount = rand_amt
|
||||
level_control.ammo_reserve[level_control.current_gun_index] += ammo_add_amount
|
||||
print("ammo + " +str(ammo_add_amount))
|
||||
# Stamina
|
||||
1:
|
||||
player.remaining_stamina += (rand_amt/100) * player.MAX_STAMINA
|
||||
@@ -47,6 +47,6 @@ func picked_up():
|
||||
level_control.health += 1
|
||||
# Money
|
||||
3:
|
||||
level_control.money += int(rand_amt)
|
||||
level_control.money += rand_amt
|
||||
|
||||
queue_free()
|
||||
|
||||
Reference in New Issue
Block a user