Jump to content

Recommended Posts

Posted

Hi,

Is there any way to get the number of entities they are stored in a map file.

I know that I can iterate through all the entities using the hook function, but I was wondering If I can get the number of entities without iteration

Posted
33 minutes ago, reepblue said:

There should be a World->CountEntities() now that I think of it. You can also check the Menu.lua script as that iterates through all the entities without a Map hook to find a camera. It should use the CountEntities() function.

Sorry about that.

I'll take a look.

Thank you very much!

Posted
7 hours ago, Josh said:

I’m curious what you will use this for?

For maps with large number of entities, it would be nice if I can display a progress of loading. So, I need this information.

So far I don't now how to get the number of entities in the map, without load it first.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...