This commit is contained in:
Rendo 2025-12-17 00:03:57 +05:00
commit 0708498715
34 changed files with 13752 additions and 7543 deletions

View file

@ -17,7 +17,7 @@ metadata/_snap_count = 8
[sub_resource type="Curve" id="Curve_jk5g7"]
[sub_resource type="Curve" id="Curve_bwg3m"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.25301203, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.4956268, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_bwg3m"]
@ -54,8 +54,8 @@ vertical_curve = SubResource("Curve_cmn6f")
horizontal_curve = SubResource("Curve_jk5g7")
damage_reduction_curve = SubResource("Curve_bwg3m")
torso_pellet_damage = 6
head_pellet_damage = 24
limb_pellet_damage = 6
head_pellet_damage = 10
limb_pellet_damage = 4
pellet_spread = NodePath("../PelletSpread")
shoot_distance = 40.0
fire_timer = NodePath("../FireTimer")

View file

@ -24,3 +24,5 @@ func _physics_process(delta: float) -> void:
var normal = collision.get_normal()
velocity = velocity.bounce(normal) * 0.5
$MultiplayerAudio3D.multiplayer_play()
$molotov2.quaternion *= Quaternion($molotov2.basis.y, velocity.normalized())

View file

@ -1,16 +1,13 @@
[gd_scene load_steps=8 format=3 uid="uid://b6qahd6q60js7"]
[ext_resource type="Script" uid="uid://y1s64ppporww" path="res://weapons/molikman/molik/molik.gd" id="1_aqokr"]
[ext_resource type="PackedScene" uid="uid://bijrgctn1e36d" path="res://models/weapons/molotov.glb" id="2_dcuri"]
[ext_resource type="AudioStream" uid="uid://dm52cfih0gboj" path="res://audio/molik_bounce.ogg" id="2_fb3en"]
[ext_resource type="Script" uid="uid://da0xv360va3b3" path="res://audio/audio_system/multiplayer_audio_3d.gd" id="3_jwbhs"]
[ext_resource type="AudioStream" uid="uid://blnblkd6eoldv" path="res://audio/molik_idle.ogg" id="4_jwbhs"]
[sub_resource type="SphereMesh" id="SphereMesh_fwcyt"]
radius = 0.05
height = 0.1
[sub_resource type="SphereShape3D" id="SphereShape3D_aqokr"]
radius = 0.05
radius = 0.1353373
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_6ic6f"]
properties/0/path = NodePath(".:position")
@ -21,8 +18,7 @@ properties/0/replication_mode = 1
collision_layer = 8
script = ExtResource("1_aqokr")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_fwcyt")
[node name="molotov2" parent="." instance=ExtResource("2_dcuri")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_aqokr")

View file

@ -15,7 +15,7 @@ properties/1/replication_mode = 1
[node name="MolikmanMolik" type="Node" node_paths=PackedStringArray("enter_state")]
script = ExtResource("1_e53aq")
animation_prefix = &"baked_sp_"
animation_prefix = &"baked_mm_molik_"
weapon_gid = &"mm_molik"
max_ammo = 1
ammo_mags = 0

View file

@ -1,41 +1,165 @@
[gd_scene load_steps=15 format=3 uid="uid://l4t1mflutm3t"]
[gd_scene load_steps=31 format=3 uid="uid://l4t1mflutm3t"]
[ext_resource type="Texture2D" uid="uid://bmnqvop2dy5pm" path="res://textures/prototype_yellow_256x256.png" id="1_hr7p8"]
[ext_resource type="Script" uid="uid://bo0ij4miuksua" path="res://weapons/molikman/molik/molikman_molotov_fire.gd" id="1_qokq0"]
[ext_resource type="Texture2D" uid="uid://b8aqstr5es5x4" path="res://textures/prototype_orange_256x256.png" id="2_qokq0"]
[ext_resource type="Texture2D" uid="uid://d0520jd5y300q" path="res://textures/players/molikman/molotov/frame0000.png" id="2_fm7jn"]
[ext_resource type="Texture2D" uid="uid://boebtrdgircn1" path="res://textures/players/molikman/molotov/frame0001.png" id="3_18xly"]
[ext_resource type="Script" uid="uid://fdikw4xjemdk" path="res://weapons/molikman/molik/molotov_animation.gd" id="4_6lhod"]
[ext_resource type="Texture2D" uid="uid://iub2i15vj7a7" path="res://textures/players/molikman/molotov/frame0002.png" id="4_wpp30"]
[ext_resource type="Texture2D" uid="uid://diy4n17p8qqkh" path="res://textures/players/molikman/molotov/frame0003.png" id="5_66mwf"]
[ext_resource type="AudioStream" uid="uid://b7sxkxs7vn4d" path="res://audio/molik_land.ogg" id="5_cq8ds"]
[ext_resource type="Script" uid="uid://da0xv360va3b3" path="res://audio/audio_system/multiplayer_audio_3d.gd" id="6_apqju"]
[ext_resource type="Texture2D" uid="uid://d07fcg5pnao3q" path="res://textures/players/molikman/molotov/frame0004.png" id="6_bt4sy"]
[ext_resource type="Texture2D" uid="uid://va158xyrsvb4" path="res://textures/players/molikman/molotov/fire_particle.png" id="7_18xly"]
[ext_resource type="AudioStream" uid="uid://blnblkd6eoldv" path="res://audio/molik_idle.ogg" id="7_apqju"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ykxjp"]
resource_local_to_scene = true
size = Vector3(7.5, 3, 7.5)
[sub_resource type="Animation" id="Animation_m625o"]
resource_name = "main"
loop_mode = 1
step = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Decal:texture_albedo")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.2, 0.4, 0.6, 0.8),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [ExtResource("2_fm7jn"), ExtResource("3_18xly"), ExtResource("4_wpp30"), ExtResource("5_66mwf"), ExtResource("6_bt4sy")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Decal:texture_emission")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.2, 0.4, 0.6, 0.8),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [ExtResource("2_fm7jn"), ExtResource("3_18xly"), ExtResource("4_wpp30"), ExtResource("5_66mwf"), ExtResource("6_bt4sy")]
}
[sub_resource type="Gradient" id="Gradient_hr7p8"]
colors = PackedColorArray(1, 0.53333336, 0, 1, 0.45, 0.45, 0.45, 1)
[sub_resource type="Animation" id="Animation_bwl5g"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Decal:texture_albedo")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_fm7jn")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Decal:texture_emission")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_fm7jn")]
}
[sub_resource type="GradientTexture1D" id="GradientTexture1D_qokq0"]
gradient = SubResource("Gradient_hr7p8")
[sub_resource type="AnimationLibrary" id="AnimationLibrary_oujc3"]
_data = {
&"RESET": SubResource("Animation_bwl5g"),
&"main": SubResource("Animation_m625o")
}
[sub_resource type="CylinderShape3D" id="CylinderShape3D_fm7jn"]
radius = 3.5
[sub_resource type="Gradient" id="Gradient_18xly"]
colors = PackedColorArray(1, 1, 1, 1, 0.3511727, 0.057953462, 7.219613e-08, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_wpp30"]
gradient = SubResource("Gradient_18xly")
[sub_resource type="Curve" id="Curve_wpp30"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_66mwf"]
curve = SubResource("Curve_wpp30")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hr7p8"]
resource_local_to_scene = true
emission_shape = 3
emission_box_extents = Vector3(3.75, 1.5, 3.75)
emission_box_extents = Vector3(3.75, 0, 3.75)
direction = Vector3(0, 1, 0)
initial_velocity_max = 3.4499998
spread = 0.0
initial_velocity_min = 1.0
initial_velocity_max = 4.0
orbit_velocity_min = -0.46899992
orbit_velocity_max = 0.4130001
gravity = Vector3(0, 0, 0)
tangential_accel_min = -3.4500022
tangential_accel_max = 2.0699978
color_ramp = SubResource("GradientTexture1D_qokq0")
linear_accel_min = -2.2351742e-06
linear_accel_max = 4.9999976
scale_curve = SubResource("CurveTexture_66mwf")
color_ramp = SubResource("GradientTexture1D_wpp30")
turbulence_enabled = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qokq0"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bt4sy"]
transparency = 1
shading_mode = 0
vertex_color_use_as_albedo = true
vertex_color_is_srgb = true
albedo_texture = ExtResource("7_18xly")
texture_filter = 0
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false
[sub_resource type="TextMesh" id="TextMesh_33jv6"]
material = SubResource("StandardMaterial3D_qokq0")
text = "fire"
[sub_resource type="QuadMesh" id="QuadMesh_m625o"]
material = SubResource("StandardMaterial3D_bt4sy")
size = Vector2(0.25, 0.25)
[sub_resource type="Gradient" id="Gradient_wpp30"]
colors = PackedColorArray(1, 1, 1, 1, 1, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_66mwf"]
gradient = SubResource("Gradient_wpp30")
[sub_resource type="Curve" id="Curve_bt4sy"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.7422681, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3
[sub_resource type="CurveTexture" id="CurveTexture_m625o"]
curve = SubResource("Curve_bt4sy")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_18xly"]
direction = Vector3(0, 1, 0)
initial_velocity_min = 10.0
initial_velocity_max = 15.0
scale_curve = SubResource("CurveTexture_m625o")
color_ramp = SubResource("GradientTexture1D_66mwf")
collision_mode = 1
collision_friction = 0.53
collision_bounce = 0.53
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_wpp30"]
transparency = 1
shading_mode = 0
vertex_color_use_as_albedo = true
vertex_color_is_srgb = true
albedo_texture = ExtResource("7_18xly")
texture_filter = 0
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false
[sub_resource type="QuadMesh" id="QuadMesh_66mwf"]
material = SubResource("StandardMaterial3D_wpp30")
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_ykxjp"]
properties/0/path = NodePath(".:position")
@ -54,19 +178,35 @@ damage_timer = NodePath("DamageTimer")
[node name="Decal" type="Decal" parent="."]
size = Vector3(7.5, 3, 7.5)
texture_albedo = ExtResource("1_hr7p8")
texture_emission = ExtResource("2_qokq0")
texture_albedo = ExtResource("2_fm7jn")
texture_emission = ExtResource("2_fm7jn")
emission_energy = 0.25
cull_mask = 1048572
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_ykxjp")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_oujc3")
}
autoplay = "main"
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
amount = 16
transform_align = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CylinderShape3D_fm7jn")
[node name="IdleParticles" type="GPUParticles3D" parent="."]
amount = 32
lifetime = 2.0
process_material = SubResource("ParticleProcessMaterial_hr7p8")
draw_pass_1 = SubResource("TextMesh_33jv6")
draw_pass_1 = SubResource("QuadMesh_m625o")
[node name="InitialParticles" type="GPUParticles3D" parent="."]
emitting = false
amount = 16
lifetime = 4.0
one_shot = true
explosiveness = 1.0
collision_base_size = 0.25
process_material = SubResource("ParticleProcessMaterial_18xly")
draw_pass_1 = SubResource("QuadMesh_66mwf")
[node name="DieTimer" type="Timer" parent="."]
wait_time = 15.0
@ -84,7 +224,7 @@ replication_config = SubResource("SceneReplicationConfig_ykxjp")
script = ExtResource("4_6lhod")
die_timer = NodePath("../DieTimer")
decal = NodePath("../Decal")
gpu_particles = NodePath("../GPUParticles3D")
gpu_particles = NodePath("../IdleParticles")
collision_shape = NodePath("../CollisionShape3D")
expansion_mult = 1.333

View file

@ -7,6 +7,8 @@ extends Node
@export var expansion_mult: float = 2.0
func _ready() -> void:
$"../InitialParticles".restart()
var tween: Tween = create_tween().set_parallel()
var time:float = die_timer.wait_time-5.0
@ -14,8 +16,7 @@ func _ready() -> void:
tween.tween_property(decal,"size:x",decal.size.x * expansion_mult,time)
tween.tween_property(decal,"size:z",decal.size.z * expansion_mult,time)
if multiplayer.is_server():
tween.tween_property(collision_shape.shape,"size:x",decal.size.x*expansion_mult,time)
tween.tween_property(collision_shape.shape,"size:z",decal.size.z*expansion_mult,time)
tween.tween_property(collision_shape.shape,"radius",decal.size.x*expansion_mult*0.5,time)
tween.tween_property(gpu_particles.process_material,"emission_box_extents:x",gpu_particles.process_material.emission_box_extents.x*expansion_mult,time)
tween.tween_property(gpu_particles.process_material,"emission_box_extents:y",gpu_particles.process_material.emission_box_extents.y*expansion_mult,time)
@ -30,6 +31,5 @@ func die() -> void:
tween.tween_property(gpu_particles.process_material,"emission_box_extents:x",1.0,time)
tween.tween_property(gpu_particles.process_material,"emission_box_extents:y",1.0,time)
if multiplayer.is_server():
tween.tween_property(collision_shape.shape,"size:x",1.0,time)
tween.tween_property(collision_shape.shape,"size:z",1.0,time)
tween.tween_property(collision_shape.shape,"radius",1.0,time)
tween.chain().tween_callback(get_parent().queue_free)

View file

@ -26,4 +26,4 @@ func fire() -> void:
machine.animation_player.stop()
machine.animation_player.play(machine.animation_prefix + "shoot")
machine.animation_player.play(machine.animation_prefix + "throw")