Jump to content

Recommended Posts

Posted

Got my hands back on 3DS thanks to a good friend so i can hopefully finish what i've once started.

 

Figured that lights only work when you use your object as ground/fortification.

 

What bothers me so far is that all my objects are not even with the ground when the ground is not even.. ehh.. just take a look

It allready has a working collision shell

 

Any Ideas?

 

Screen_210817_174125.jpg

Posted (edited)

Going from memory here, but check your .lua, it is probably 'by normal'. try some of the other positioning. 

 

 

edit:
 
   positioning = "ONLYHEIGTH"  --available: {"BYNORMAL", "ONLYHEIGTH", "BY_XZ", "ADD_HEIGTH"}

Edited by dolfo
Posted

You're the man Dolfo, that does the trick, and even much much more. The Object is now a static object and voila, the light is working too. Incredible !!!!

 

Can't be thankfull enough. In case someone is interested, this is how my lua file looks like:

 

mount_vfs_model_path    (current_mod_path.."/Shapes/")
mount_vfs_texture_path  (current_mod_path.."/Textures/HendersonAirbase.zip")

local function add_structure(f)
    if(f) then
        f.shape_table_data =
        {
            {
                file          = f.ShapeName,
                life        = f.Life,
                username    = f.Name,
                desrt       = f.ShapeNameDestr or "self",
                classname     = f.classname   or "lLandVehicle",
                positioning = f.positioning or "ONLYHEIGTH" -- {"BYNORMAL", "ONLYHEIGTH", "BY_XZ", "ADD_HEIGTH"}
            }
        }
        if f.ShapeNameDestr then
            f.shape_table_data[#f.shape_table_data + 1] =
            {
                name  = f.ShapeNameDestr,
                file  = f.ShapeNameDestr,    
            }
        end
        
        
        f.mapclasskey = MapClassKey or "P0091000076";
        f.attribute = {wsType_Static, wsType_Standing}
        
        add_surface_unit(f)
        GT = nil;
    else
        error("Can't add structure")
    end;
end


add_structure({
Name          =  "Lightpole P-lot Orange",
DisplayName  = _("Lightpole P-lot Orange"),
ShapeName     =   "Lightpole_5M_orange",
ShapeNameDestr = "Lightpole_5M_orange",
Life         =  10,
Rate         =  10,
category     =  'Fortification',
SeaObject    =     false,
isPutToWater =  false,
numParking   =  1,
})

  • Like 2
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...