Open
Description
What Happened
I thought, 'How can delta
from every frame
be obtained without creating that variable?' I created the variable with the exact name delta
and printed the result which was a float. The debugger displays a warning that delta
shadows the already-declared variable.
This unlocks a feature, but it can become a problem if the types don't match
Generated script:
extends Node2D
var delta: float
func _ready():
delta = 0
func _process(delta):
print((delta))
How to Reproduce
- Create a variable named
delta
- Place an
every frame
block - Attach a
log text
block toevery frame
- Attach
delta
as input tolog text
- Run the scene
Block Coding Plugin Version
v0.7.1
Godot Engine Version
v4.3
Operating System
No response
Logs or command-line output
W 0:00:02:0492 The local function parameter "delta" is shadowing an already-declared variable at line 3.
<GDScript Error>SHADOWED_VARIABLE
<GDScript Source>gdscript://-9223371985063508500.gd:9
Anything else?
No response