Hi,
OK I searched quite a lot time for it. So there either is nothing or I am dumb (

)
I'm working with Blender and using Blender2Crystal for the models. I already exported a nice Map and managed to walk around like in a FPS. Well for an FPS I need a gun. My Problem: I didn't managed to export my weapon model from Blender, so that I can use it as an own object.
First try:
I exported my gun-szene like a world map. I tried to load the gun with the factories in the exported .zip (because there is a directory called "factories"). This failed.
Second try:
In the first tutorial is code to load a object:
csRef<iMeshFactoryWrapper> imeshfact (loader->LoadMeshObjectFactory (
"/lib/std/sprite1"));
if (imeshfact == 0)
ReportError("Error loading mesh object factory!");
// Add the sprite to the engine.
csRef<iMeshWrapper> sprite (engine->CreateMeshWrapper (
imeshfact, "MySprite", room,
csVector3 (-3, 5, 3)));
So I tried:
csRef<iMeshFactoryWrapper> imeshfact (loader->LoadMeshObjectFactory (
"/lib/shotgun/library"));
if (imeshfact == 0)
ReportError("Error loading mesh object factory!");
// Add the sprite to the engine.
csRef<iMeshWrapper> sprite (engine->CreateMeshWrapper (
imeshfact, "MySprite", room,
csVector3 (-3, 5, 3)));
Error: crystalspace.maploader.parse.map: File '/lib/shotgun/library' does not seem to contain a 'meshfact'!and
csRef<iMeshFactoryWrapper> imeshfact (loader->LoadMeshObjectFactory (
"/lib/shotgun/factories/genBody"));
if (imeshfact == 0)
ReportError("Error loading mesh object factory!");
// Add the sprite to the engine.
csRef<iMeshWrapper> sprite (engine->CreateMeshWrapper (
imeshfact, "MySprite", room,
csVector3 (-3, 5, 3)));
Error: crystalspace.maploader.parse.map: File '/lib/shotgun/factories/genBody' does not seem to contain a 'meshfact'!This failed too...
Third try:
Somewhere I found this code:
VFS->ChDir ("/lib/shotgun");
if (!loader->LoadLibraryFile ("library"))
ReportError("Error couldn't load shotgun!");
csRef<iMeshFactoryWrapper> MyGun (loader->LoadMeshObjectFactory (
"/lib/shotgun/factories/genBody"));
if (MyGun == 0)
ReportError("Error loading mesh object factory!");
csRef<iMeshWrapper> sprite (engine->CreateMeshWrapper (
MyGun, "MyGun", room,
csVector3 (-3, 5, 3)));
All possible errors occurred -.-
Now I don't know what to do. Maybe the code above is just ...hum... silly. I don't know. But my first thought was that I maybe used b2cs wrong. So I searched for a better tutorial how I can get objects into CS. All I found were tutorials about maps. But I already have a running map...
I know I'm a newbie atm ^^
Hope you can help me.