Godot random seed generator (SOLVED)

Godot Version

4.5.1

Question

I’m wanna make a game where you solve puzzles, by debug codes. The thing is, it’s full of shaders… And it’s using a noise texture with a very high frequency as the “Corruption”. I wanna randomize the texture’s seed when the project is loaded, but i dont know how to reach it and modify it. Any ideas how to do it?

You can get the noise texture’s .noise and change the seed. I do this for a cowprint texture (for only one cow) in one of my games.

var cowprint: NoiseTexture2D = preload("res://System/cowprint_tex.tres")
cowprint.noise.seed = randi()

If you intend to use multiple of the resource with randomized seeds then you will need to use “Local to Scene” and grab the resource from each node that uses the noise texture.

Thank you, I’ll try it!

It says Invalid access to properity or key noise

Thank you for your help, but I got the solution in another topic… Thank you though :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.