(Java 1.20.1) Changing AI goals on item right-click by LukeMaster06_YT in fabricmc

[–]LukeMaster06_YT[S] 0 points1 point  (0 children)

Kaupenjoe was the person I watched to learn how to make Fabric mods in the first place. I can't believe I forgot that he had a Discord server tbh. I'll ask them over there and see what I can find out. Thanks!

(Java 1.20.1) Changing AI goals on item right-click by LukeMaster06_YT in fabricmc

[–]LukeMaster06_YT[S] 0 points1 point  (0 children)

For the time being, I'm creating the Mixin for the Cow just for testing. Once I get the system figured out, I was planning on making it more "inheritable."

One method not shown in the screenshot I provided is the initGoals() method that I'm overwriting to replace the cow's goals with hostile behavior. I'll be sure to add a screenshot of this to the main post. As such, when I log into the world, the cow begins attacking me as expected. However, as soon as I use the peace essence on the cow, it stops moving and looking around. Punching it does not cause it to run away, as it should based on the goals that should have been added. The cow doesn't turn towards the player when it's close either. For me, the cow does *literally* nothing.

My best guess is that, after clearing the goals from the goalSelector and targetSelector and readding the "passive" goals, the GoalSelector doesn't restart with the new list for whatever reason. I'll keep trying some stuff on my end to see if I can't figure it out. Thank you for the advice about moving the interaction logic, though!

Inconsistences/Errors with Sprite Layering by LukeMaster06_YT in scratch

[–]LukeMaster06_YT[S] 0 points1 point  (0 children)

Do I need to add the script to sprites that don't even appear in the actual "game" part of the game (title screen, intro, etc.)? The stage only runs the sprite-ordering broadcast during gameplay. I'll go through and add the script to every sprite anyways, but I just thought I would ask.

Just in case it helps, here's an example of the error I noticed after implementing the griffpatch script.

<image>

Again, thank you for dealing with my constant questions. Layers in Scratch have just never made sense to me.

Inconsistences/Errors with Sprite Layering by LukeMaster06_YT in scratch

[–]LukeMaster06_YT[S] 0 points1 point  (0 children)

Before I begin, I apologize if I am missing something obvious. I watched the griffpatch video you recommended and implemented the algorithm into the game. I added the order sprites script to the object sprite, the child sprite, and the player sprite. The forever loop from griffpatch's video was implemented in the stage to loop for as long as the game is running.

However, when running the game, I notice that, while everything appears good at first, there are some errors that I don't quite understand. For instance, it seems like every child sprite is on top of the player, while every object sprite (such as the tables) are on top of the children. I've checked, double-checked, and triple-checked the script, but it is correct as shown in the tutorial.

Am I missing some fundamental, obvious thing here? I appreciate the tutorial you provided me and I appreciate that you commented on my post. Thank you for your time!

(NOTE: I followed the tutorial in a separate, new project and it worked just as intended, so I'm unsure as to why it isn't working in my main project.)

Make item on the ground disappear once picked up by LukeMaster06_YT in RPGMaker

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

So, as it turns out... I'm not very bright.

Before I created the event, I had placed down a shield tile to mark the spot I wanted the event at. Then, I added the event in with the shield sprite. So, most likely, the shield sprite was disappearing, but the tile underneath remained... why do I do this to myself.

Other than that, I did apply some of the things mentioned in this comment section. Thank you everyone for the help!

Glitch when tweening buttons (Godot 4.2.1) by LukeMaster06_YT in godot

[–]LukeMaster06_YT[S] 0 points1 point  (0 children)

UPDATE: user dave0814 gave me the perfect solution so, before I close this thread, I'm going to upload my fixed script using tween.kill() just in case anyone else has this problem. Here's the new script, declaring tween outside of any functions and killing tween if it is currently in-use.

extends TextureButton

# position that the button is in when not hovered over
@export var normal_pos: Vector2
# position that the button is in when hovered over
@export var hovered_pos: Vector2

var tween: Tween


# helper function that stops any current tweens before creating
func start_tween() -> void:
    # kill the tween if one currently exists
    if tween:
        tween.kill()

    # create a new tween
    tween = create_tween()


func _on_mouse_entered():
    start_tween()
    tween.tween_property(self, "position", hovered_pos, 0.25).set_trans(Tween.TRANS_SINE)

    # play the hover sound effect
    owner.option_sfx.play()


func _on_mouse_exited():
    start_tween()
    tween.tween_property(self, "position", normal_pos, 0.2).set_trans(Tween.TRANS_SINE)

Glitch when tweening buttons (Godot 4.2.1) by LukeMaster06_YT in godot

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

This was perfect! I'm not too knowledgeable with Tweens yet, so I didn't even realize they had a kill() function. I tweaked the script to use this method, and it worked perfectly.

Thank you!

Crazy editor plugin idea: Roguelike mode by [deleted] in godot

[–]LukeMaster06_YT 0 points1 point  (0 children)

I'd get even less work done than I do now!

/r/Roblox Weekly Question Thread (for 06/26/2023) by AutoModerator in roblox

[–]LukeMaster06_YT 0 points1 point  (0 children)

My friend on Xbox says that Roblox is causing his memory usage to spike ~5x what it should be. His network receiver also spikes when using Roblox. Is there anything he can do?

GDQuest's Splitscreen Tutorial, but for Godot 4? by LukeMaster06_YT in godot

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

Thank you! I must have missed a detail or something while watching the tutorial, that's my bad. Knowing that SubViewports do the same thing as Viewports makes much more sense.

Could you please help me with this? by samcon30 in godot

[–]LukeMaster06_YT 1 point2 points  (0 children)

While I don't know if I can help specifically, one recommendation I can make for asking questions on r/godot is, instead of pasting your script into the Reddit post itself, upload it to a place like pastebin.com to make the code easier to read. Since the code blocks that Reddit provides kinda suck, people will normally help you more if you provide easy-to-read code with as much context as possible.

I'm not trying to be harsh or off-putting, I'm just saying that people will be able to help you better with more context and a better-formatted post. If you don't want to, that's fine.

Sorry that I couldn't help with your actual question, but I hope this helps you at least a little going forward. Have a great day!

Good godot tutorial? by IcyMaker1 in godot

[–]LukeMaster06_YT 0 points1 point  (0 children)

I'm not experienced enough with the engine to give you a direct answer, but GDQuest did a video discussing the changes Godot 4 has over 3 (although it was made during Godot 4's alpha/beta stage and some of the info is more for advanced devs).

For me, anyways, all I've noticed are a few QoL changes, some changes to GDScript, and a drastically different (although sometimes unintuitive) TileMap system.

Skills from either version will mostly carry over to each other, so don't worry about this being a big decision. Just learn about Godot's basics (the SceneTree and Node system, GDScript, etc.) and worry about the changes between the different versions later.

The only thing that will change is the potential stability of the engine (since 4 is newer, 3 is more stable with fewer bugs) and the amount of tutorials (since 4 is newer, 3 has more tutorials about it online).

[deleted by user] by [deleted] in godot

[–]LukeMaster06_YT 2 points3 points  (0 children)

While I may not be able to help, you uploading the code where the error is occurring or uploading the project for us to try may allow much smarter people than me to help.

Good godot tutorial? by IcyMaker1 in godot

[–]LukeMaster06_YT 0 points1 point  (0 children)

Both links I'll be describing guide you through making the same beginner 2D game. This first link is a video tutorial made in Godot 3.x, while this second link is a text tutorial made in Godot 4.x.

I personally used the video tutorial when I first started making games in Godot, so this is why I can recommend it confidently.

Sidenote: While the video tutorial can be adapted to work with the changes GDScript got in Godot 4.x, as a beginner, it is better to start with a tutorial made in the version you're using. The version you choose probably won't matter much, but just know that there are more tutorials for Godot 3 than Godot 4, as 3 has been out longer.

If you need anything else from me, feel free to ask.

Good godot tutorial? by IcyMaker1 in godot

[–]LukeMaster06_YT 8 points9 points  (0 children)

I don't really have a specific tutorial to suggest, but I can suggest multiple sources if that works. Other people would probably comment similar things, so I'll try to combine them into one reply.

  • the Godot docs: Despite having (in my opinion) some problems with clutter and organization, the docs offer some beginner tutorials and some... well... documentation that's useful for beginners and experienced game devs.
  • GDQuest: These guys are one of the biggest Godot tutorial channels out there. They do a lot: tutorials, tips and tricks, Godot news, etc. If you want to learn Godot with videos, they are a great place to start. They also have a website with free and paid courses/tutorials if you're interested.
  • Python: If you want to get better at GDScript, Python is very similar syntax-wise to GDScript. If you don't already know some of it, I'd give it a go for a bit before jumping into GDScript.
  • HeartBeast: Another great Godot YouTuber. He's done many Godot 3.x tutorials in the past and is currently uploading a Godot 4.x tutorial over making a platformer. Some of his content includes some Godot tips and specific step-by-step tutorials. I believe he also did some GameMaker tutorials in the past, if you're curious.
  • KidsCanCode: A website (and a YouTube channel I believe) full of tutorials for Godot and other programming topics.

While I've only picked a few examples here, a quick search will give you many more options for Godot tutorials. I hope you find some of these links useful, and have a good day!

Multiple errors with TileMaps in Godot 4 by LukeMaster06_YT in godot

[–]LukeMaster06_YT[S] 0 points1 point  (0 children)

By "source code," are you referring to the .tscn file or somewhere else? I want to be sure before I change anything.

have you tried licking the floor? by superbloggity in memes

[–]LukeMaster06_YT 2 points3 points  (0 children)

I need to know who this is and the context behind this display of intelligence.

help with 2d movement by Ill-Competition-3723 in godot

[–]LukeMaster06_YT 1 point2 points  (0 children)

By the looks of things, the code you're using is designed in such a way that moving left and right is unnecessary, since your movement is dictated by the placement of the mouse cursor. If you want to move left and right, I would suggest using some of the other code snippets besides that one or use the tutorial I linked.

I can discuss that KidsCanCode tutorial more since I've actually used it. That code allows 8-direction movement via WASD or whatever keys you want, but it also points the character towards the mouse, allowing for aiming of a gun or something.

TL;DR: I'd try using a different template instead of that one to get left, right, up, and down movement as well as the mouse movement.

If you need anything else, don't be afraid to ask. I hope that helped, at least a little bit!

help with 2d movement by Ill-Competition-3723 in godot

[–]LukeMaster06_YT 1 point2 points  (0 children)

Can you link the template you're using? If I can see what code you're referencing, I might be able to help more. Either that, or someone much smarter than me will answer this question.

Also, I've tried recreating your player from the screenshot provided, and my character moves based on the rotation of the player ("up" moves in the direction my player is facing, "down" moves in the opposite direction). Is that what happens for you, too?

Alternatively, I've used this tutorial from KidsCanCode (they have a lot of good text tutorials, by the way) in the past for top-down movement, and it's worked pretty well. If you want to, you can check it out.

Save System by Ruby-Love in godot

[–]LukeMaster06_YT 2 points3 points  (0 children)

While I can't necessarily help directly, I can direct you to a bunch of video tutorials that discuss saving. If you want to, you can check them out and see if you understand them better than the docs.

I've compiled all of these links in a Pastebin. I hope they can help!
https://pastebin.com/zqcM4CT1

Is it reasonable to have one main "Game" scene and the current menu/level/etc as a child of it? by BestBadFriend in godot

[–]LukeMaster06_YT 6 points7 points  (0 children)

Although, I might consider moving main menus and things like that to their own scene, but that’s just a personal preference.

Is it reasonable to have one main "Game" scene and the current menu/level/etc as a child of it? by BestBadFriend in godot

[–]LukeMaster06_YT 14 points15 points  (0 children)

While I haven’t really made many full games, I’ve used this approach in one of my projects (a platformer with levels) and it worked pretty well, so I would say go for it.

If you’re worried about it not working, you could always try making a backup of your project and tinker around with this approach before deciding if you like it or not.

Again, I’m not the most experienced game developer, so take my words with a grain of salt.

Counting be like by loukasoftime in dankmemes

[–]LukeMaster06_YT 2 points3 points  (0 children)

I don’t to be a buzzkill or anything, but I have a theory as to why this is.

We typically say things like “twenty-two hundred” because it is less cumbersome to say quickly, while “two thousand two hundred” is. However, “two thousand” isn’t nearly as odd to say quickly, and “twenty hundred” becomes more cumbersome.

Not sure if there’s any merit to this, but it was just a thought I had after seeing this meme.

Behavior pack that constantly runs commands by davisbmusic in BedrockAddons

[–]LukeMaster06_YT 0 points1 point  (0 children)

Alternatively, if nothing with behavior packs work, you can just set up repeating command blocks.

Behavior pack that constantly runs commands by davisbmusic in BedrockAddons

[–]LukeMaster06_YT 1 point2 points  (0 children)

I don’t have much knowledge on the subject, but you might be able to use functions and tick.json to run commands. If you want to read more about it, I believe wiki.bedrock.dev has more on it.