Jump to content

Find a world entity in C++


Roland
 Share

Recommended Posts

I tested the Map hook but it works partially.

 

In the attached image you can see my hook which prints the name of each object sent to the hook by Map::Load. The only entity seems to be the light. The two boxes in the scene never shows up in the hook.

Any suggestions ?

 

post-395-0-86052000-1418940651_thumb.png

 

According to the docs EVERY entity loaded will reach the hook

 

Map::Load

 

This function loads a Leadwerks map (*.map) file.

Syntax

  • static bool Load(const std::string& path, int flags=LoadScripts, const uint64_t fileid=0)
  • static bool Load(const std::string& path, void hook(Entity* entity, Object* extra), Object* extra=NULL, const int flags=LoadScripts, const uint64_t fileid=0);

Parameters

  • path: the file path to load the scene from.
  • hook: pointer to a function that will be called for each loaded entity in the scene.
  • hookname: script function name that will be called for each loaded entity in the scene.

AV MX Linux

Link to comment
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.

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.

 Share

×
×
  • Create New...