make a utility script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By patatra

Hi everyone,
I would like to make a script with a lot of small useful functions but which have their place everywhere in the scripts. how would you do it? Should it extend a class? How to call it in a script?

good evening,

:bust_in_silhouette: Reply From: Mario

This sounds like something you’d typically put in a global/autoload.

:bust_in_silhouette: Reply From: Wakatta

Utility script

class_name Utility extends Reference

func electrical():

func water(speed):

Player Script

extends Node

func _ready():
    var utility =

Some other script

extends Control

onready var utility =

func _ready():

func _process(delta):