Jump to content

Dynamic map change


Nimzog
 Share

Recommended Posts

Hello

 

I am trying to change a map while in game. The result I am getting at the moment is that each time I do a Map::Load() the new one is added to the old one. This means that the lights get freakish and objects that should not be there are still there. I looked around the command reference doc and I cant find a way to delete an old map as it is not assigned to a variable anywhere. Is there a way using the context or world object? I am doing this in C++ in case it is usefull.

Link to comment
Share on other sites

I dont want to destroy all the entities because its like an alternate world of the current one that we can switch back to at some point. I just found the setCurrent/getCurrent methods would those be better suited for that?

Link to comment
Share on other sites

Well I'm pretty sure anything loaded will be displayed. I think you might want to load 1 map into 1 world, then switch to a different world and then load another map (which will put those entities into that world). I'm not sure if you can show/hide worlds from the world variable but if not you could either make a pivot in each world and loop through all entities and making it a child of this pivot (this might mess up other things in your entities) and then just hide/show that 1 pivot to hide/show all child entities, or just loop through each entities in each world and call Show/Hide on them.

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