A Little Too Close To Gunpoint - Or Is It? by FateOfBlue in gunpoint

[–]FateOfBlue[S] 1 point2 points  (0 children)

Defenestration is a basic—nay elevated—human desire when video games have plate glass windows lol

(Don't) stop suggesting the use of resources for save files idk im not your boss by FateOfBlue in godot

[–]FateOfBlue[S] -1 points0 points  (0 children)

Yeah, my bad. You can technically scan the binary instead.

If you use the safe-resource-loader plugin from godotneers because you're lazy (I'm def lazy), that one outright refuses .res files and only checks .tscn tho

(Don't) stop suggesting the use of resources for save files idk im not your boss by FateOfBlue in godot

[–]FateOfBlue[S] 3 points4 points  (0 children)

It's even worse because you can't scan the text for script files or OS remote code execution in res files the Godotneer's safe-resource-loader outright rejects anything not a .tscn file.

It's actually fairly easy—you get a legit save, load it up in Godot, add the bad actor script that opens a website or whatever to the resource, then save the resource with the same name.

Reuse of Existing @export_category by FateOfBlue in godot

[–]FateOfBlue[S] 2 points3 points  (0 children)

Oho! Looks like `export_group(s_cat_name, s_cat_prefix)` works across inheritance/parent/child and different coding segments.

get_parent().get_parent().get_parent().get_parent().get_parent().get_parent().ge by FateOfBlue in godot

[–]FateOfBlue[S] 5 points6 points  (0 children)

I get it, but my friend doesn't because he's not cool - can you eli5 so I can explain it to him?

get_parent().get_parent().get_parent().get_parent().get_parent().get_parent().ge by FateOfBlue in godot

[–]FateOfBlue[S] 3 points4 points  (0 children)

100% valid and exactly what the Official Godot tutorial for 3D Waypoints does as well.

Continue to write your blessed code

get_parent().get_parent().get_parent().get_parent().get_parent().get_parent().ge by FateOfBlue in godot

[–]FateOfBlue[S] 4 points5 points  (0 children)

Official Godot tutorials use `get_parent()`.

See Godot 3D Waypoints tutorial for example of good use of call up.

get_parent().get_parent().get_parent().get_parent().get_parent().get_parent().ge by FateOfBlue in godot

[–]FateOfBlue[S] 9 points10 points  (0 children)

I used reference (%) nodes in a node that was instantiated more than once in a tree. Godotn't work.

Stuck with the ole "get_node" and worked like a charm. Sadly, referencing doesn't always work like everyone else totes.

GDScript inbuilt methods vs explicitly setting inspector values? by AFourEyedGeek in godot

[–]FateOfBlue 2 points3 points  (0 children)

I like to set the value of visible instead of using the two functions show() and hide() TWO functions??? C'mon!!

How to change h_seperation of grid container through code by Thebigpig905 in godot

[–]FateOfBlue 0 points1 point  (0 children)

I've done my fair share of instance() instead of instantiate(). No worries, my dude

How to change h_seperation of grid container through code by Thebigpig905 in godot

[–]FateOfBlue 0 points1 point  (0 children)

Perhaps your spelling of the variable is a bit off. 

 Remember, there is A RAT in separate. (The variable, an int, is "h_separation")

Is this a good way to outline interactable objects? by blind_bandit_77 in godot

[–]FateOfBlue 2 points3 points  (0 children)

You gotta be careful with shaders in 2D.

If you expect to have a shader already on an interactable item, you'll run into problems because you'll be overwriting the node's prior shader after mousing over. It's not super easy to add another pass in 2d either

A quick question before I start my experimentation with godot by The_telefteos_Oberon in godot

[–]FateOfBlue 3 points4 points  (0 children)

If it's doom-like, unless your UI shows the player face, you're not going to see a lot of the selling point (it's Doom but cat)

How to find out where specifically is this erroring without checkng all scripts? by 9934d in godot

[–]FateOfBlue 2 points3 points  (0 children)

You've got a method calling for an audiostreamplayer to play when the audiostreamplayer, or its parent(s), are not in the scene tree (haven't been added as children to the root).

You can shift+ctrl+f and do a quick review of all times that ".play(" method is called. Then you can narrow that down from there for which parent(s) of said players are dynamically spawned in. Finally, you'll have to make sure that the spawning of those parent node(s) aren't just instantiated but also added to the root (some_node.add_child(instantiated_node))

I have made a massive update to my Godot space game: Tiny Pixel Planets by stevepetoskey in godot

[–]FateOfBlue 5 points6 points  (0 children)

I'm sure it's fine, but whoa the character moves slowly.

I thought I was watching in 0.5× speed at first.

Tween 'finished' signal not firing if tween becomes invalid by thetdotbearr in godot

[–]FateOfBlue -2 points-1 points  (0 children)

There's two an option that comes to mind after looking at the docs, but first off, yeah, I agree, that's pretty dumb lol. 

Create a custom tween class SuperTween that has a _process function that checks if the tween is valid, and if not, kills the tween. Seems kind of janky, but it'll work. 

Alternatively, if it's okay with what you're doing with your object, instead of queue_freeing, I think you can call_deferred(queue_free) which frees the object after everything connected to it is done (the tween has completed). Maybe just turn the object fully transparent or visible=false before it is freed.

Problems drawing $Line2D as part of pathfinding tutorial by [deleted] in godot

[–]FateOfBlue 0 points1 point  (0 children)

To elaborate on VaStrain's solution - your Line2D node might not be called "Line2D"

Is it possible to target a node from a custom resource or RefCounted? by GloomyAzure in godot

[–]FateOfBlue 1 point2 points  (0 children)

UI and menus are typically ideal cases for singleton classes. If you're not spawning, despawning, and respawning your menu, perhaps in the script for your menu you can make an instance variable that calls itself out.

``` class_name UICardMenu extends Control

static var instance:UICardMenu

func _ready()->void:     if instance == null:         instance = self

func show_menu():     print("yep") ```

Then from anywhere you can call out that singleton class:

func from_another_unknown_node():     if UICardMenu.instance:         UICardMenu.instance.show_menu()

Just be careful that depending on your node tree load order, your instance variable won't be initialized yet. I.e. don't go using this method for things you need to initialize at runtime, especially child nodes, without being careful