lootPos editing

Forgotten

Well-Known Member
I have added lots of new buildings to my Chernarus map, and lots of them are not included in the config.cpp, so therefore do not spawn loot. I have successfully been able to get some of them to spawn loot by copying the lootPos of existing buildings.

For example, I added military loot to the two story bunker:

Code:
class WarfareBDepot: Military {
        minRoaming = 1;
        maxRoaming = 3;
        lootChance = 0.5;
        zombieClass[] = {"z_soldier","z_soldier_heavy"};
        lootPos[] = {{-3.52246,-5.03931,1.14726},{2.36621,-4.52295,1.14786},{1.39063,-0.423096,1.14746},{1.14258,5.00952,1.1478},{3.7124,1.89795,1.14788}};
    };

I believe I just used the lootPos for an industrial shed. But the loot def does not spawn the same. First of all, it spawns on the second story. Second, it spawns floating in the air, not as high as the doghouse, but still floating.

I figured the positions were some sort of an x,y,z from the center of the building. But if you look at something like the office building:

Code:
class Land_A_MunicipalOffice: Residential {
        zombieChance = 0;
        minRoaming = 3;
        maxRoaming = 6;
        zombieClass[] = {"z_soldier","z_soldier_heavy","z_policeman"};
        lootChance = 0.4;
        lootPos[] = {{-4.66113,-6.27173,-18.429},{3.31641,-5.77417,-18.429},{-0.20752,-6.48682,-18.429},{-9.72412,-4.88745,-3.78903},{-9.57813,3.55615,-3.78903},{-7.16797,11.0737,-3.78903},{5.07422,11.1838,-3.78903},{9.3208,5.38623,-3.78903},{9.65332,-4.82056,-3.78903},{3.23535,-0.105957,-0.169027},{4.85205,-3.69019,-0.169027},{-0.80127,-7.89087,-0.169027},{-4.4082,-4.91772,-0.169027},{-4.90771,-2.23169,-0.169027}};

Most of the numbers I believe should be altitude are negatives. I would have then said that the third number must also then be from some sort of center plane, measured halfway down from the top and bottom of the building?

Everything I've posted is pretty much just educated guesses based off of messing around with the code and seeing what happens. If anyone has a different take on lootPos, I would love to hear about it so that we may all understand this and get loot added correctly to new buildings.
 
Bump, still looking for insight on this if anyone has correctly added loot to buildings that do not have it.
 
Back
Top