This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Basically, what the title states: I like the Escoria framework very much; and also the escoria scripting looks nice. But for some cases is very limiting, and I need to access to both gdscript and escoria scripting for the same object function.
for example the change_scene function; I tried to address directly the function with something like:

get_tree().get_root().get_node("vm").change_scene(["res://where/to/teleport.scn"], null)

but didn't worked to me

in Engine by (25 points)

2 Answers

0 votes

I've found sort of "fix" for this: I hope someone will come with a more elegant way, in meanwhile, for those google's traveler, here's how I am doing it actually:

Make a regular escoria item as said here:

And attach the escoria script, with the stuff you want, in the Event Path. ie:


say "this is the escoria script I want to use in the regular GDScript."

Now attach the escoria node as child of the node that use your main GDScript... you can name your "slave" escoria node whatever you want, I do call it just "slave"

Whenver in your main GDSscript run a:

get_node("slave").activate("look", null)

the slave node will perform the escoria escoria script you need (in this example, the player will simply speak). You can also hide the slave node, since we don't really use it.

by (25 points)
+1 vote

Here's what I am doing to trigger level changes but this should work for anything?

get the magic controller guy that does everything

var vm = gettree().getroot().get_node("vm")

this is equivalent to a line in a .esc file

var event = [{"name":"changescene", "params":[scenefile]}]

then launch it just like it was loaded from the .esc file (in this example scene file is a string to the resource)


By putting a break point at runevent inside you can watch examples coming up for different command from .esc scripts.

by (20 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.