in godot 4 "export var" doesnt seem to be working. what is the correct way to expose parameters from script in godot4?
https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_exports.html
The documentation has been mostly updated. If you end up on the website, look on the far bottom left and choose latest (which is Godot 4.0).
tnx
found most of my answers however i dont understand on how to setup arrays
export(Array,AudioStreamSample) var footstepsNormal
Typed Arrays aren't supported. But you can do this:
@export var footstepsNormal : Array
Then in the Inspector you have to choose AudioStreamSample. Kind of annoying, but whatever.
tnx that worked
im also getting errors not finding nodepaths from scripts. how do i fix these?
extends Node3D @export var camera_path: NodePath var camera = get_node(camera_path) func _process(_delta): global_transform = camera.global_transform
If you get nodes outside of functions (at the top of the script) they need to be on ready:
@onready var camera = get_node(camera_path)
extends Node3D @export var camera_path: NodePath @onready var camera = get_node(camera_path) func _process(_delta): global_transform = camera.global_transform
still doesnt run
console screen
Probably Epic Games hacking your Godot. Why is the Epic Games overlay running in Godot? You might also need to update your graphics drivers if you have an old version, I think Godot works best with the latest Vulkan.
lol i have no epic games installed, cant find it anywhere
ive installed epic games and uninstalled it. im still getting failed to open json file from epic launcher ive also updated my graphics drivers
that's odd, is it someones custom build of godot?
@Megalomaniak said: that's odd, is it someones custom build of godot? i got the alpha from here> https://godotengine.org/article/dev-snapshot-godot-4-0-alpha-1
Typed arrays are supported:
@export var footstepsNormal : Array[AudioStreamSample]