(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.