Extraordinay 0 Posted April 10, 2020 (edited) So if we create a script in-game with many many blocks, and I want that script to work as function, which means that I can summon it with a simple command like myFunction() is it possible in this engine? Edited April 10, 2020 by Extraordinay Share this post Link to post Share on other sites
Indomitus 388 Posted April 10, 2020 Yes, and there are a few ways to do this. One way is to put it in a Global Storage, and give it the name you want and define the parameters it needs. Then, if you go to the Instructions section from inside any entity or logic, and click the name of that Global Storage, it will show that function as a tile you can drag out into your script. Remember to use the right type, whether it needs to return information or not. There's one that will return a single value, one that will return an array, and one that doesn't return any value. You can also do this with instructions inside Entity Storage or Logic Storage. Those can be assigned to specific objects, and it basically makes a dedicated copy of it for that object. When you call a function that's in one of those, you have to specify which object it's attached to. 1 1 Share this post Link to post Share on other sites