Skip to content

Instantly share code, notes, and snippets.

Avatar

Emberlynn DeerTears

View GitHub Profile
@DeerTears
DeerTears / dont_crash.md
Created Sep 15, 2021
this killed my site once lol
View dont_crash.md
View this is a test.md

test wow test wow test wow test test wow test_test wow

@DeerTears
DeerTears / bouncing_vector3.gd
Created Apr 15, 2021
attempting to figure out a better way to bounce or debug my code since bouncing is too strong in godot's 3d for some reason?
View bouncing_vector3.gd
var direction
func phys_process(delta):
if player_hit_wall:
if not just_bounced:
var wall_normal = $WallCast.get_collision_normal()
if wall_normal.length() != 0:
just_bounced = true
# bug: this code only shows intensity, not sign of the bounce
var bounce_phi = (direction.dot(wall_normal))
if bounce_phi > 0.75:
View trenchbroom_pbr_guide.md
View can_i_use_these_property_groups.gd
# https://docs.godotengine.org/en/stable/classes/class_@globalscope.html#enum-globalscope-propertyusageflags
PROPERTY_USAGE_GROUP = 128
#Used to group properties together in the editor.
PROPERTY_USAGE_CATEGORY = 256
# Used to categorize properties together in the editor.
PROPERTY_HINT_EXP_EASING = 4
# Hints that a float property should be edited via an exponential easing function. The hint string can include "attenuation" to flip the curve horizontally and/or "inout" to also include in/out easing.
View slidermargin_property_test.py
#godot printout of slidermargin.gd. extends container.
{class_name:, hint:0, hint_string:, name:Node, type:0, usage:256},
{class_name:, hint:18, hint_string:, name:editor_description, type:4, usage:1048578},
{class_name:, hint:0, hint_string:, name:_import_path, type:15, usage:1048581},
{class_name:, hint:0, hint_string:pause_, name:Pause, type:0, usage:128},
{class_name:, hint:3, hint_string:Inherit,Stop,Process, name:pause_mode, type:2, usage:7},
{class_name:, hint:0, hint_string:, name:name, type:4, usage:0},
{class_name:, hint:0, hint_string:, name:filename, type:4, usage:0},
{class_name:Node, hint:17, hint_string:Node, name:owner, type:17, usage:0},
@DeerTears
DeerTears / maybe update editor properties.gd
Created Jan 11, 2021
figuring out how to actually update the editor properties in real time when changed by another property. animated sliders in tool scripts, if you will.
View maybe update editor properties.gd
# https://docs.godotengine.org/en/stable/classes/class_object.html#method-descriptions
property_list_changed_notify()
# Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds.
# might not do what i want
View adding_images_to_gb_studio_site.txt
You can include images by adding them to the folder static/img/ and then you can include them by adding a HTML tag to your content.
https://github.com/chrismaltby/gb-studio-site/tree/develop/static/img/screenshots
https://github.com/chrismaltby/gb-studio-site/tree/develop/static/img/events
e.g.
If you added an image as static/img/screenshots/actor-limits.png you would be able to include it in a page like this
<img title="New Project" src="/img/screenshots/actor-limits.png" width="812">
The width is optional as the image will scale to full width if you don't provide it, I just set it manually on a few images when I know the exact size I want to images to appear.
View table_dir.md
  • Actor: Store Direction In Variable
    Store the current direction of an actor into a variable.

    Direction Number
    Down 1
    Right 2
    Up 3
    Left 4
View _godot-notepad++-userstyle.md

DeerTears Fork of Notepad++ userstyle for Godot's GDScript

I fixed a lot of stuff but it's not perfect. Saw this old userstyle floating around for like a year before I decided to try messing with it more.

Roadmap

  • Get all functions to highlight correctly
  • Try to implement parts of the GD-utils functions for autocomplete
  • Attempt to PR this to Notepad++'s official repo
  • Have fun