Added cotton for blood

This commit is contained in:
Paul Black 2023-04-06 13:27:41 -06:00
parent a61c51b263
commit f0087ac6b1
10 changed files with 1660 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
characters/.DS_Store vendored Normal file

Binary file not shown.

BIN
characters/teddy/.DS_Store vendored Normal file

Binary file not shown.

View file

@ -177,6 +177,10 @@ func _physics_process(delta):
if teddyAuthority == 1:
Global.roundInSession = true
rpc("round_start")
if Global.spawnCotton == true:
Global.spawnCotton = false
rpc("spawn_cotton")
spawn_cotton()
rpc("remote_set_position", global_position, $CollisionShape3D/Neck/Teddy.global_rotation.y, $CollisionShape3D/Neck/Camera3D/BulletGenerator.global_position, $CollisionShape3D/Neck/Camera3D/BulletGenerator.global_rotation)
rpc("set_teddy_name", teddyName, Global.playerName)
move_and_slide()
@ -219,3 +223,10 @@ func set_teddy_name(node, name):
@rpc("authority", "reliable", "call_remote")
func round_start():
Global.roundInSession = true
@rpc("any_peer", "unreliable")
func spawn_cotton():
print("SPAWNED COTTON (HOPEFULLY)")
$CPUParticles3D.emitting = true
await get_tree().create_timer(0.5).timeout
$CPUParticles3D.emitting = false

View file

@ -0,0 +1,24 @@
# Blender MTL File: 'None'
# Material Count: 2
newmtl Cotton
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2
map_Kd .
newmtl Cotton.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2
map_Kd .

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
[remap]
importer="wavefront_obj"
importer_version=1
type="Mesh"
uid="uid://b26a54y2fd5n8"
path="res://.godot/imported/cotton.obj-0f2bc56b5b23644f24b35d86a8e1412c.mesh"
[deps]
files=["res://.godot/imported/cotton.obj-0f2bc56b5b23644f24b35d86a8e1412c.mesh"]
source_file="res://characters/teddy/cotton/cotton.obj"
dest_files=["res://.godot/imported/cotton.obj-0f2bc56b5b23644f24b35d86a8e1412c.mesh", "res://.godot/imported/cotton.obj-0f2bc56b5b23644f24b35d86a8e1412c.mesh"]
[params]
generate_tangents=true
scale_mesh=Vector3(1, 1, 1)
offset_mesh=Vector3(0, 0, 0)
optimize_mesh=true

View file

@ -50,3 +50,4 @@ func take_damage(damager):
var damage = RandomNumberGenerator.new().randi_range(7, 16)
Global.playerHealth = Global.playerHealth - damage
Global.lastPersonToHitMe = damager
Global.spawnCotton = true

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid://dp1q51kvd8uow"]
[gd_scene load_steps=7 format=3 uid="uid://dp1q51kvd8uow"]
[ext_resource type="Script" path="res://characters/teddy/Teddy.gd" id="1_ywxo5"]
[ext_resource type="PackedScene" uid="uid://b3l10agcjfgdx" path="res://characters/teddy/model_glb/teddy.glb" id="2_xx41h"]
[ext_resource type="Script" path="res://scripts/nameLabel.gd" id="3_1v4js"]
[ext_resource type="ArrayMesh" uid="uid://b26a54y2fd5n8" path="res://characters/teddy/cotton/cotton.obj" id="4_37tsh"]
[sub_resource type="BoxShape3D" id="BoxShape3D_rpt2n"]
size = Vector3(1, 1.99126, 1)
@ -38,3 +39,23 @@ transform = Transform3D(-0.33293, 1.16122e-16, -2.91057e-08, 1.16122e-16, 0.3329
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.60152, 0)
text = "Un-named Player"
script = ExtResource("3_1v4js")
[node name="CPUParticles3D" type="CPUParticles3D" parent="."]
emitting = false
amount = 3
mesh = ExtResource("4_37tsh")
emission_shape = 1
emission_sphere_radius = 1.0
particle_flag_rotate_y = true
spread = 4.55
gravity = Vector3(2.08165e-12, -6, 2.08165e-12)
initial_velocity_max = 4.76
angular_velocity_max = 54.86
linear_accel_max = 2.02
radial_accel_max = 4.04
tangential_accel_max = 3.06
damping_max = 3.27
angle_min = 7.3
angle_max = 29.1
scale_amount_min = 0.05
scale_amount_max = 0.2

View file

@ -45,6 +45,7 @@ var volumeModifer = 1 # Modifies volume level
var tutorialComplete = false # Used only for tutorial
var AIHit = false # Used so the AI knows to take damage
var iAmDeadAndInnocent = false # Used to keep track of when an innocent dies in TTT
var spawnCotton = false # bullet will change this to true
func _process(delta):
#if not spawnCoordsInitalized: