About Store Forum Documentation Contact



Post Reply 
Accessing World Decals / MeshOverlays
Author Message
Driklyn Offline
Member

Post: #1
Accessing World Decals / MeshOverlays
Is it possible to access Decals and MeshOverlays that you've added to your world via World Editor through code?

It appears that Decals and MeshOverlays are automatically set to "Embed into Terrain" so they're automatically loaded into the game, even if you manually specify Default or Constant access, which is fine I suppose, but I don't see any methods in Game::World that will allow you to access them.

It's not possible to call Game::World.setObjType and load them in using an ObjMemx because they aren't derived from Game::Obj class.

The only way I could think to do this is to create your own custom class derived from Game::Obj and either use the material path or a string parameter as the decal. But, if you did it this way, you wouldn't be able to preview how the decal would look in-game (actually, I suppose you could just switch from back and forth from OBJ_DECAL to your own custom OBJ_TYPE, but this is not necessarily ideal).
07-22-2011 09:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Accessing World Decals / MeshOverlays
those are private in Game::Area::Data
do you want me to add access to them (as const) ?
07-27-2011 01:20 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #3
RE: Accessing World Decals / MeshOverlays
Yes, please.. smile I think it would prove to be beneficial and, since you can access all other OBJ_TYPE's, it only makes sense that you should be able to access OBJ_DECAL and OBJ_MESH_OVERLAY as well.

I am currently using a custom Game::Obj class to load them in, which works, but being able to access OBJ_DECAL and OBJ_MESH_OVERLAY directly would be nice.

Will you be able to access all decals/overlays throughout the active world in a single container like Game::World.decals and Game::World.meshOverlays or, since they're apart of Game::Area::Data, will you have to specify an area first and receive a container with only the decals/overlays in that specific area?

Also, would it be possible to add a replaceClass method so we can replace the default Decal and MeshOverlay classes with custom ones?
(This post was last modified: 07-27-2011 10:18 PM by Driklyn.)
07-27-2011 10:12 PM
Find all posts by this user Quote this message in a reply
krokodilcapa Offline
Member

Post: #4
RE: Accessing World Decals / MeshOverlays
Now somebody could help me to load the decals what I placed in WE througth code?

Huh... found it. I didn't know about the existence of ObjDecal class grin
(This post was last modified: 04-15-2013 10:51 PM by krokodilcapa.)
04-15-2013 09:50 PM
Find all posts by this user Quote this message in a reply
Post Reply