From c1693ff7876276a3b17d50e79df2b1ce5f3fbb0a Mon Sep 17 00:00:00 2001 From: ncusimano Date: Sun, 20 Aug 2023 16:58:05 -0600 Subject: [PATCH] Cultist Killability --- godot/Level/Island.tscn | 10 +++++----- godot/slime_kill_box.gd | 2 +- godot/slime_shared.gd | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/godot/Level/Island.tscn b/godot/Level/Island.tscn index 0f3c94a..9f48542 100644 --- a/godot/Level/Island.tscn +++ b/godot/Level/Island.tscn @@ -22,13 +22,13 @@ [ext_resource type="PackedScene" uid="uid://c4s6y758n77lw" path="res://villager_shared.tscn" id="24_ddfvk"] [ext_resource type="PackedScene" uid="uid://b3aus2kigf8xt" path="res://Models/beach_decor/cooler.tscn" id="24_sl7ne"] [ext_resource type="PackedScene" uid="uid://cft26nug7kyqb" path="res://ambient_light_1.tscn" id="25_novxt"] -[ext_resource type="PackedScene" uid="uid://ukful430mmkn" path="res://color_cube.tscn" id="25_rm0cr"] -[ext_resource type="PackedScene" uid="uid://d2pvg0f5jtpve" path="res://slime_kill_box.tscn" id="27_cjxk6"] +[ext_resource type="PackedScene" path="res://color_cube.tscn" id="25_rm0cr"] +[ext_resource type="PackedScene" path="res://slime_kill_box.tscn" id="27_cjxk6"] [ext_resource type="PackedScene" uid="uid://bw3k2c75qavce" path="res://Models/beach_decor/bucket.tscn" id="27_f3p1i"] -[ext_resource type="PackedScene" uid="uid://6ycop5t3nra5" path="res://Level/World/DayNightEnvironment.tscn" id="27_jutn4"] +[ext_resource type="PackedScene" path="res://Level/World/DayNightEnvironment.tscn" id="27_jutn4"] [ext_resource type="PackedScene" uid="uid://g4gmc0pwlak1" path="res://Models/buildings/fence.tscn" id="28_prydb"] -[ext_resource type="PackedScene" uid="uid://ckbba1bs71tl" path="res://crate.tscn" id="28_x0lrj"] -[ext_resource type="PackedScene" path="res://spawner.tscn" id="29_etvc6"] +[ext_resource type="PackedScene" path="res://crate.tscn" id="28_x0lrj"] +[ext_resource type="PackedScene" uid="uid://d0uw7ykhb1cx8" path="res://spawner.tscn" id="29_etvc6"] [sub_resource type="Animation" id="Animation_jpnyu"] resource_name = "waves" diff --git a/godot/slime_kill_box.gd b/godot/slime_kill_box.gd index 63128ef..b7e0e91 100644 --- a/godot/slime_kill_box.gd +++ b/godot/slime_kill_box.gd @@ -2,6 +2,6 @@ extends Area3D func _on_body_entered(body): - if "color_changes" in body: + if "is_killable" in body: body.queue_free() $AudioStreamPlayer.play() diff --git a/godot/slime_shared.gd b/godot/slime_shared.gd index ebed2f2..ef5ecbd 100644 --- a/godot/slime_shared.gd +++ b/godot/slime_shared.gd @@ -2,6 +2,7 @@ extends CharacterBody3D class_name SharedSlime var is_holdable: bool = true +var is_killable: bool = true var rng = RandomNumberGenerator.new() @onready var target_location_xz = transform.origin * Vector3(1, 0, 1)