yurembo Posted Thursday at 06:15 PM Posted Thursday at 06:15 PM How to get an object (which was made in the editor) from the scene to control it programmatically (from a script)? Quote
Josh Posted Thursday at 10:04 PM Posted Thursday at 10:04 PM https://www.leadwerks.com/learn/Scene_GetEntity 1 Quote Let's build cool stuff and have fun.
yurembo Posted 15 hours ago Author Posted 15 hours ago @Josh Unfortunately, the documentation for the Scene class is very short. There's only one example for the LoadScene method. When running, it produces an error: This example shows how to create a Scene object in code, but the question remains: how to retrieve it from a map file, which was created in the editor? Scene:GetEntity is described well. Is the UUID always unique? Does it never change? How is it generated? Is it some kind of COM identifier? Quote
yurembo Posted 13 hours ago Author Posted 13 hours ago this transformation does not work: mesh = NavMesh(nav_mesh)-- nav_mesh is Entity, but NavMesh s = type(mesh)-- s = nil Quote
Josh Posted 12 hours ago Posted 12 hours ago Navmeshes are stored in the scene. See the Monster script for an example. Quote Let's build cool stuff and have fun.
yurembo Posted 12 hours ago Author Posted 12 hours ago OK, I'll consider this file. How can I get a map from the file? While I'm reading the source code I see that Map and Scene are the same. Quote
Solution Josh Posted 11 hours ago Solution Posted 11 hours ago The scene object is passed in the script Load function. You can get the navmesh there. 1 Quote Let's build cool stuff and have fun.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.