Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

It would be great to have automatically :

Entities animated models loaded.

Actually static models are loaded, why not animated characters ? what is the problem ?


The solution in C++ is to attach some empty Lua script, and load character by it's name and code in a callback function sad.png

Not so good workflow.

As we should load map and find in it all models we placed could it be static or characters, we should not have ot laod them as they are in the map.

Strange non common system , that is same map loading a LE2 :(


Why not doing like other 3D engines, and load all what you put on the map ?

  • Upvote 1
Link to post
Share on other sites

It's not a problem with animated characters since I had same issue with primitives. I hope it will be changed so that we'll not be forced to have an empty script or having mass. Also having a callback for each entity is definitely not needed, it would be much better to have an Entity::Find to search for an entity by name among all the currently active entities (indipendently from having loaded a map or instanced through code), but leaving a callback to be called after the map has been fully loaded (that is all its entities loaded, not one by one that is unuseful if we had a generic Find).

Link to post
Share on other sites

For me it worked with static and animated entities, will check it again later, but it worked 5 minutes ago.


The callback thing was long awaited feature since LE2. You can not only make (in my opinion) cleaner code to handle special entites, but you can also integrate some kind of progress indicator. The callback itself has nearly no penaltiy on speed, as a maploader always needs to lpad an entity one by one and it doesn't hurt calling a small function providing such info.


Well, for me the callback can be extended to provide some progress info as well beside sthe loaded entity. Like number of entiy and total entity count. Mybe some kind of mapinfo class might be suitable. These infos could be sotred in the header and don't need much space.


Link to post
Share on other sites

I too prefer the entity callback. It allows you to store only the objects that you actually need. The documentation states that you have to specify a boolean when you want to load script and flowgraph information. However this seems to happen anyway. Also, I have no problem loading in a scene with animation. It works right away.

Link to post
Share on other sites

Also, I have no problem loading in a scene with animation

but you do it by code with the callback.

It's not puttign some character without any lua script in the editor and just call LoadMap without any callback : it won't work.


And models can be characters or rocks, so wich will be loaded without callback and any lua Script ?

i can't imagine a scene where you put 200 rocks models, and you have to load all entities yourself with callbacks and putting or each some empty Lua script.?

Link to post
Share on other sites

To resume how does it works : when to load them, when it is done automatically ?

1) For static entities like rocks to load automatically ? (the rocks in my level don't necessary need collision if they are decorative in some parts, and they don't need mass as they are static)

2) For models with physics ?

2) For animated characters ?




I think the best would be LE3 to grow up instead of relying in LE2 map loading system sad.png


1) you place pivots or empty objects in the scene with some name :

you manage yourself the laoding of 3D models


2) you place characters, models in the level editor and save map

they are automatically loaded independently (even without mass or script)


It depends on your game style also, some adventure game with some 4 or 10 NPC at screen , you prefer the engien to auto load them.

I have some example RPG project, where there can be 20 characters on the map, not grouped, your code just manage to display and animate the nearest ones, the others are just hidden and not managed.

For this example, indeed : auto load characters.


Strange any other 3D engine, automatically loads characters or models if you have placed them in the map.

why LE3 is so weak on that point ?

A map loading, is loading all stuff you put in the level editor.

Link to post
Share on other sites

What are you talking about? Everything you place in the editor is loaded via the LoadMap function. Animations, prefabs csg, eveything is there. You can call hooks on loaded entities that are models, have a script or have mass. The only thing that we are requesting is that you simply add a checkbox for CSG that allows you to call a hook on it during map loading, without having to add a script or set its mass.

Link to post
Share on other sites

@Rick :

If i don't attach some Lua script to Goblin or Barbarian , they are not loaded automatically by calling LoadMap only (no entity callback)

If i add some Lua script in the editor , they are auto loaded by calling the LoadMap with no CallBack function.


I mean in any engine, if you place characters, geometry, anything : All that is loaded by calling one function like LoadMap and don't need any entity callback functions and any script.


So if LE3 could load alone all what we place with the editor automatically with one call to loadmap only, it would be better i think.

(no more annoying work arounds)

Link to post
Share on other sites

You don't need the callback, its optional. You can access all entities in a world after your map is loaded like this:


for(std::list<Entity*>::iterator it = world->entities.begin(); it != world->entities.end(); it++)
	Entity* entity = *it;


The script workaround is just for CSG objects, which are normally collapsed and optimized while the map is loaded and so they are no real entities anymore. Everything else is loaded out of the box.

Link to post
Share on other sites

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.

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...