Fixed item drops (barely) and added labels to begin work on fixing collision layers

This commit is contained in:
derek
2024-09-24 16:57:14 -05:00
parent dc825eff92
commit 030a7605bc
7 changed files with 21 additions and 6 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
.godot/
godot-git-plugin-v3.1.1/addons/godot-git-plugin/win64/~libgit_plugin.windows.editor.x86_64.dll
GameplayRecordings/desktop.ini
*.dll

View File

@@ -25,6 +25,11 @@ movie_writer/movie_file="C:/Users/derek/My Drive/First Person Test/GameplayRecor
version_control/plugin_name="GitPlugin"
version_control/autoload_on_startup=true
[global_group]
pickup=""
enemy=""
[input]
move_left={
@@ -108,6 +113,14 @@ interact={
]
}
[layer_names]
3d_physics/layer_1="World"
3d_physics/layer_2="Control"
3d_physics/layer_3="Player"
3d_physics/layer_4="Enemy"
3d_physics/layer_5="Pickups"
[physics]
3d/physics_engine="JoltPhysics3D"

View File

@@ -147,6 +147,6 @@ func die():
func pickup_spawn():
var item_type = pickups.pick_random()
var item_spawn = item_type[0][0].instantiate()
var item_name = item_type[1][0]
#var item_name = item_type[1][0]
item_spawn.rand_amt = randi_range(25,100)
return item_spawn

View File

@@ -18,6 +18,4 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
var lv_x = rng.randf_range(-10,10.0)
var lv_y = rng.randf_range(-10.0,10.0)
position = Vector2(viewportWidth/2 - (size.x/2), viewportHeight/2 - (size.y/2))

View File

@@ -10,6 +10,7 @@ var taunts = ["hows your gut now you big cup of dumdum juice?",
"schwing!",
"hee hee",
"stop trying",
"you got hit with my bullet",
"yowza!"]
# Called when the node enters the scene tree for the first time.
@@ -21,3 +22,4 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

View File

@@ -36,12 +36,14 @@ func picked_up():
match pickupType:
# Ammo
0:
var ammo_add_amount = rand_amt
var ammo_add_amount : int = (rand_amt * .01) * player.gun.max_ammo #this is ugly and I don't like it but it works to force the random amount into being treated as float
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
var stamina_add_amount = (rand_amt * .01) * player.MAX_STAMINA
player.remaining_stamina += stamina_add_amount
print("stamina + " +str(stamina_add_amount))
# Health
2:
level_control.health += 1

View File

@@ -158,7 +158,6 @@ func fire(delta):
player.weapon_recoil(delta)
chamber.rotate_object_local(Vector3(0,-1,0),deg_to_rad(60))
func reload(delta):
if level_control.ammo_current[gun_index] < max_ammo and player.gun.anim_player.get_current_animation() != "reload" and level_control.ammo_reserve[gun_index] > 0:
anim_player.play("reload")