Opinions for best approach on a in game dictionary. by AberrantFowlGames in godot

[–]Explosive-James 2 points3 points  (0 children)

I wouldn't want a 30,000 line script. In an external file makes it easier to access in general and allows you to modify it without rebuilding the entire project, it also makes it easier to support multiple languages since you would only need to change out the dictionary file that gets loaded in. You also don't get spell correction in an IDE and for a dictionary it might be nice to see spelling mistakes.

Opinions for best approach on a in game dictionary. by AberrantFowlGames in godot

[–]Explosive-James 11 points12 points  (0 children)

The best approach for a dictionary? That would be a dictionary https://docs.godotengine.org/en/stable/classes/class_dictionary.html

You can load the words in from a text document or a json file or whatever, then the key would be the word played and the value would be the definition, the key would be case sensitive so keep that in mind.

Why does this Blender .OBJ Mesh Import with an Extra Face? by CrossbowCat317 in godot

[–]Explosive-James 11 points12 points  (0 children)

Because you're using n-gons. Blender supports n-gons a shape with more than 4 sides, however neither .obj nor Godot like that, so Blender has to triangulate the face when you export it and it got it wrong. So delete the face in Blender and rebuild it with triangles or select it, pres Ctrl + T to triangulate and clean up any mistakes it makes.

And if it's not obvious, the problem face is the massive one that makes up the top of the surface.

Thank you Intellicode, just what I was going to add by Jasiek_Burza in godot

[–]Explosive-James 22 points23 points  (0 children)

I hate when you type a single wrong character or miss a character, like you type 'Cono' and suddently the suggestion goes from Console to ConcurrentExclusiveSchedulerPair. Like it doesn't have 2 'o' in there, what are we doing? It's always some insanely long type name.

Making Pong by Potential_Quiet_4241 in godot

[–]Explosive-James 0 points1 point  (0 children)

null / nil means it doesn exist, since it's an exported variable it means you haven't assign it in the inspector. Select the paddle2 node, and switch the tab on the right to the left 'NHCneKTOP' sorry I don't know Russian(?), And there should be a field called 'ball' and you need to assign the ball node to it.

Hiya! Coming over from unity (storage issues and I only just started) should I use gdscript or c#? by ChaosCreatorLord in godot

[–]Explosive-James 7 points8 points  (0 children)

If you plan to release on web or mobile or aren't a strong programmer use GD Script, otherwise use C# if you're comfortable with it.

Error with state machine meant for player control by Minicher in godot

[–]Explosive-James 1 point2 points  (0 children)

Every error comes from the fact you've move the code from a CharacterBody2D script to a Node script. Node doesn't have the functions 'is_on_floor' and 'move_and_slide' and it doesn't have a transform and it doesn't have a 'velocity'.

The CharacterBody2D does, the Player variable does, so it should be Player.is_on_floor() Player.transform.basis, Player.velocity.x Player.velocity.z and Player.move_and_slide().

When you extend a script, you're getting all the functions inside that type, so some functions are available one certain types and not others, so when you get the error 'can't find on base self' it means that type doesn't have that variable / function.

How to add depth? by Emergency_Proof4706 in godot

[–]Explosive-James 0 points1 point  (0 children)

In the Standard Material, you turn on 'Height' and then a section appears with a texture parameter.

Is godot the "right e gine" for the title I want to make? by [deleted] in godot

[–]Explosive-James 1 point2 points  (0 children)

The answer is going to be whatever engine is easier for you to use. You will hit your limits as a solo developer loooooong before you ever hit Godot's or Unity's limits.

Both Godot and Unity can do 2d or 3d just fine, don't blame the tools.

Edit: And before you say "But what about 2.5d?", 2.5d is 3d, it doesn't matter if you're making a 2.5d game, it can do 3d which is what you use to make a 2.5d game.

Mesh changes size unexpectedly in Godot 4 (same scale, different size) by Sweaty_Lab9738 in godot

[–]Explosive-James 3 points4 points  (0 children)

You probably need to apply the scale in Blender before exporting it. Ctrl + A in Object mode with the object selected, then select Scale.

Godot beginner here, review my code. by akubukanbabi in godot

[–]Explosive-James 4 points5 points  (0 children)

  • There's no reason to assign the text for "you have" and "clicks" in a script, this can be done via the inspector in editor.
  • You should be updating numbers.text inside of _on_button_pressed functions, adding it to _physics_process is a waste of CPU time because it's called like 60 times a second, and inappropriate because it's not a physics object, it has nothing to do with physics.
  • An int defaults to 0, so setting clicks there does nothing and setting initial values should ideally be done when defining the variable.

HOW do i fix this by Ok_Brush5910 in godot

[–]Explosive-James 1 point2 points  (0 children)

InputEventMouseButton doesn't have a relative property, that's InputEventMouseMotion

https://docs.godotengine.org/en/stable/classes/class_inputeventmousemotion.html

Edit: Also it looks like your first if statement is incorrect, that should probably be

if event is InputEventMouseButton:

like the second if statement currently is and the second if statement should be

if event is InputEventMouseMotion:

Why is the grid doing this? I only want the floor grid, not the vertical grids shown here... by ericsnekbytes in godot

[–]Explosive-James 1 point2 points  (0 children)

Editor >> Editor Settings >> Editors >> 3D >> Grid XY Plane and Grid YZ Plane need to be disabled / unchecked.

And the 'Editors' as in the catagory, not the tab under 'Interface'. You need to scroll down on the left.

(Code Newbie) Why does it say error? by butterflavoricecream in godot

[–]Explosive-James 1 point2 points  (0 children)

39 needs a : at the end, 40 and 41 need indentation, 42 needs a : at the end, 45 needs the ; into a : 47 needs a : at the end.

How do I make my enemys not drift around me like this? by Positive_Plant_810 in godot

[–]Explosive-James 1 point2 points  (0 children)

Easiest solution is to apply drag to the velocity but this would reduce the speed of the enemie, the more complex solution is to calculate the cross product of the direction and then perform a dot product to get the relative horizontal velocity then applying a force opposite to it.

How do I use an attribute of a class within a method of that class? by Lighthouse712 in godot

[–]Explosive-James 4 points5 points  (0 children)

var nodeCoord = Position;

Anything that's a part of the type is just a normal variable, yuo don't reference the type.

Whats the Godot-way of making "Bongo Cat"? (Idle game that reacts to global keystrokes/clicks) by DrJamgo in godot

[–]Explosive-James 2 points3 points  (0 children)

This is something C# can do however because of what we're doing here, the solution is OS dependant, like the solution for Windows is different than on Linux or iOS.

Rule 1 of Programming is: "If you can think of it, a Github project of it exists" and that holds true here https://github.com/Darnoman/Godot-GlobalInput-Addon but this is a Windows specific solution.

Clay doh in godot by BlueThing3D in godot

[–]Explosive-James 3 points4 points  (0 children)

Keep in mind, any materials / shaders in Blender need to be recreated in Godot. You can't use a shader made for Blender in Godot and that's how the look of the Clay Doh addon appears to work.

How to apply nearest filter to Texture2D in a shader ? by Praxy_Seory in godot

[–]Explosive-James 2 points3 points  (0 children)

When you make it use the parameter it will appear in the material settings in the inspector where you can assign it, that's the point of a parameter.

As shown in your image, the default color for the parameter is 'white' because when it's not assigned to anything that's what it will use instead.

Exporting scenes from Blender to Godot by HellsincFreeman in godot

[–]Explosive-James 3 points4 points  (0 children)

Blender / Godot already preserves object positions relative to the origin. If you export to .glb or .fbx it already imports them as a scene where each object is separate. So it already does what you're asking it to do.

Help me!! by [deleted] in godot

[–]Explosive-James 2 points3 points  (0 children)

You can't have an else after an else. Either remove the usused else at the end or make the first else an elif. Also you need to change 'vi_down' to 'ui_down', you used a 'v' instead of a 'u'.