diedir Posted October 27, 2023 Posted October 27, 2023 Hello, need to retrieve entities.count world:CountEntities() don't seem to work, if someone knows how to enumerate the world entities... thank you Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11
Josh Posted October 27, 2023 Posted October 27, 2023 The world does not store a list of entities, but the map object that is returned by LoadMap does. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
diedir Posted October 27, 2023 Author Posted October 27, 2023 sorry i tried with scene and error occured: local scene = LoadMap(world, mapname) for x=0,scene:CountEntities()-1 do local entity = scene:GetEntity(x) local name = entity:GetKeyValue("name") if name == "cube1" then.....etc Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11
Josh Posted October 27, 2023 Posted October 27, 2023 What engine are you using? Quote My job is to make tools you love, with the features you want, and performance you can't live without.
diedir Posted October 27, 2023 Author Posted October 27, 2023 Ultra Engine obviously 1 Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11
Solution Josh Posted October 27, 2023 Solution Posted October 27, 2023 for n = 1, #scene.entities do entity = scene.entities[n] end Quote My job is to make tools you love, with the features you want, and performance you can't live without.
diedir Posted October 27, 2023 Author Posted October 27, 2023 thank you Josh Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11
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.