Equipable Items - Swap Gathering Tool or Weapons with Gdscript - Godot 4 Tutorial

1 year ago
39

Setup a slot for items equipped to the hand and switch between hand items by using gdscript code in Godot 4. This tutorial shows how to use the tool annotation in Godot 4 to let code like swapping sprites on set run both in the editor and in game. Be careful with using the tool annotation though, code running in the editor can make permanent changes to your project which is useful when done write and potentially dangerous to your project when written incorrectly.

Series Playlist ➣ https://www.youtube.com/playlist?list=PLyH-qXFkNSxlANk9EwZmbtECBfbHeW68-
Art Pack ➣ https://chris-tutorials.itch.io/gatherers-exterior-pack
Final Scripts ➣ https://ko-fi.com/post/All-Scripts-for-Resource-Gathering-RPG-in-Godot-4-M4M0LCB9V
Full Project with Art Pack ➣ https://ko-fi.com/post/Full-Project-and-Assets-for-Resource-Gathering-RPG-G2G7LCBBS

➣ Downloadable Assets, Video Courses, and Other Places to Follow Me
https://linktr.ee/ChrisTutorials
https://ko-fi.com/christutorials
https://chris-tutorials.itch.io/

00:00 - Hitting Resource Node with Equipped Tool
04:18 - Equipable Items
11:29 - Equipped Item Setter to Update Sprite Texture
13:48 - @tool Annotation - Update Sprite in Editor with Code
15:02 - @tool Node Access Limitations

Loading comments...