Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions scenes/game_elements/characters/enemies/guard/guard.gd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and all other files outside the StoryQuest folder should be reverted, if you want to include this quest in the main game.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
extends CharacterBody2D


const SPEED = 300.0
const JUMP_VELOCITY = -400.0


func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta

# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY

# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction := Input.get_axis("ui_left", "ui_right")
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)

move_and_slide()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://d0ycs8tqopqp2
4 changes: 2 additions & 2 deletions scenes/game_elements/props/checkpoint/checkpoint.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[ext_resource type="Script" uid="uid://bk5ri1yoakaqp" path="res://scenes/game_elements/props/checkpoint/components/checkpoint.gd" id="1_kkoqv"]
[ext_resource type="Script" uid="uid://0enyu5v4ra34" path="res://scenes/game_elements/props/spawn_point/components/spawn_point.gd" id="2_s5d1s"]
[ext_resource type="SpriteFrames" uid="uid://dmg1egdoye3ns" path="res://scenes/game_elements/props/checkpoint/components/knitwitch_frames_purple.tres" id="4_3xcwf"]
[ext_resource type="SpriteFrames" uid="uid://dldi5su6c4aou" path="res://scenes/quests/story_quests/amaru_creative_games/1_stealth/stealth_components/amaru_creative_games_chekpoint.tres" id="3_3xcwf"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the sprite of every other StoryQuest in the game. Instead, you should set "Sprite frames" in each of the checkpoints of your 1st minigame.

Image

[ext_resource type="PackedScene" uid="uid://dutgnbiy7xalb" path="res://scenes/game_elements/props/interact_area/interact_area.tscn" id="4_cukws"]
[ext_resource type="Script" uid="uid://edcifob4jc4s" path="res://scenes/game_logic/talk_behavior.gd" id="5_3xcwf"]

Expand All @@ -20,7 +20,7 @@ script = ExtResource("2_s5d1s")
[node name="Sprite" type="AnimatedSprite2D" parent="."]
unique_name_in_owner = true
position = Vector2(0, -40)
sprite_frames = ExtResource("4_3xcwf")
sprite_frames = ExtResource("3_3xcwf")
animation = &"idle"
autoplay = "idle"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const DEFAULT_SPRITE_FRAMES: SpriteFrames = preload("uid://dmg1egdoye3ns")
## and should not loop.
##
## [code]idle[/code] is played once the [code]appear[/code] animation finishes.
const REQUIRED_ANIMATIONS := [&"idle", &"appear"]
const REQUIRED_ANIMATIONS := [&"idle", &"appear", &"rest"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately is not possible to add more animations to the checkpoint in the main game. What is the use of the rest animation?


## Animations for this checkpoint. The SpriteFrames must have specific animations;
## see [constant Checkpoint.REQUIRED_ANIMATIONS].
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[gd_resource type="SpriteFrames" load_steps=7 format=3 uid="uid://btt6217hxjkva"]

[sub_resource type="AtlasTexture" id="AtlasTexture_j505o"]
region = Rect2(0, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_78yus"]
region = Rect2(192, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_cru18"]
region = Rect2(384, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_uqk7a"]
region = Rect2(576, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_l0x5r"]
region = Rect2(768, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_r5rrb"]
region = Rect2(960, 0, 192, 192)

[resource]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_j505o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_78yus")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cru18")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uqk7a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l0x5r")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r5rrb")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[gd_resource type="SpriteFrames" load_steps=6 format=3 uid="uid://bkqberv58dobw"]

[ext_resource type="Texture2D" uid="uid://b1q8nawd5ypa3" path="res://scenes/quests/story_quests/amaru_creative_games/Element/bush/components/Bush_Red_Large.png" id="1_fvkjp"]

[sub_resource type="AtlasTexture" id="AtlasTexture_rc1mw"]
atlas = ExtResource("1_fvkjp")
region = Rect2(0, 0, 128, 128)

[sub_resource type="AtlasTexture" id="AtlasTexture_bjomc"]
atlas = ExtResource("1_fvkjp")
region = Rect2(128, 0, 128, 128)

[sub_resource type="AtlasTexture" id="AtlasTexture_rmdry"]
atlas = ExtResource("1_fvkjp")
region = Rect2(256, 0, 128, 128)

[sub_resource type="AtlasTexture" id="AtlasTexture_hlk8k"]
atlas = ExtResource("1_fvkjp")
region = Rect2(384, 0, 128, 128)

[resource]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_rc1mw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bjomc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rmdry")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hlk8k")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[gd_scene load_steps=4 format=3 uid="uid://dugyl3xd0t0ro"]

[ext_resource type="Script" uid="uid://jllabtpjc46i" path="res://scenes/game_elements/props/decoration/animated_decoration.gd" id="1_k7aa2"]
[ext_resource type="SpriteFrames" uid="uid://bkqberv58dobw" path="res://scenes/quests/story_quests/amaru_creative_games/0_intro/Items/amaru_creative_games_green.tres" id="2_uc6ta"]
[ext_resource type="Script" uid="uid://cms2wqtbxjl1h" path="res://scenes/game_elements/props/decoration/random_frame_animated_sprite.gd" id="3_5m5d5"]

[node name="Bush" type="Node2D"]
script = ExtResource("1_k7aa2")
sprite_frames = ExtResource("2_uc6ta")

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
unique_name_in_owner = true
position = Vector2(0, -14)
sprite_frames = ExtResource("2_uc6ta")
autoplay = "default"
script = ExtResource("3_5m5d5")
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://bvh2ts1srusjs"
path="res://.godot/imported/amaru_creative_game_intro.wav-bf43aa6db31893421e6a37d449843741.sample"

[deps]

source_file="res://scenes/quests/story_quests/amaru_creative_games/0_intro/Music/amaru_creative_game_intro.wav"
dest_files=["res://.godot/imported/amaru_creative_game_intro.wav-bf43aa6db31893421e6a37d449843741.sample"]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2
Loading