endlessm / godot-block-coding

Block-based visual programming plugin for Godot
https://godotengine.org/asset-library/asset/3095
MIT License
295 stars 20 forks source link

Add arguments to call methods #126

Open Melon-The-Dev opened 4 months ago

Melon-The-Dev commented 4 months ago

What Happened

im trying to call a method with arguments but there are no inputs to put the argument values..

after some digging on the code i wanted to add it myself, but i got stuck cuz idk what to put as the type on the block format, it could be just VARIANT or something but idk for sure

How to Reproduce

  1. add call method block

Operating System

No response

Logs or command-line output

No response

Anything else?

No response

manuq commented 4 months ago

@Melon-The-Dev thanks. Yes this is something we need to think about. I am researching how to enhace blocks with overloading. For instance, the current Print block only takes a String, but it should be able to take any Variant as argument.

Melon-The-Dev commented 4 months ago

@Melon-The-Dev thanks. Yes this is something we need to think about. I am researching how to enhace blocks with overloading. For instance, the current Print block only takes a String, but it should be able to take any Variant as argument.

ahh i see, i might tinker around the code of the addon and see if i can do smth

manuq commented 4 weeks ago

Here is a reference for someone wanting to implement this: https://youtu.be/FARjoscK0vw?t=1650 . That video shows how a function can be defined with arguments in MakeCode Arcade.