Open DoomTas3r opened 2 weeks ago
Yes, very good point. For variables maybe adding them all to a _block_coding_variables = {}
dictionary would be an option.
Then we have the same issue when defining methods: the user can currently shadow a builtin method like Node2D rotate()
using the "define method" block.
What Happened
I thought, 'How can
delta
fromevery frame
be obtained without creating that variable?' I created the variable with the exact namedelta
and printed the result which was a float. The debugger displays a warning thatdelta
shadows the already-declared variable.This unlocks a feature, but it can become a problem if the types don't match
Generated script:
How to Reproduce
delta
every frame
blocklog text
block toevery frame
delta
as input tolog text
Block Coding Plugin Version
v0.7.1
Godot Engine Version
v4.3
Operating System
No response
Logs or command-line output
Anything else?
No response