Da0ne / DZMods

DayZ Standalone Vanilla++ project
Other
35 stars 19 forks source link

Building spawner issues #122

Closed sy8282 closed 5 years ago

sy8282 commented 5 years ago

so looking at the 0.4 mod update do i need to edit every single spawned building to fit the new code mine are currently in this format and i have lots please tell me i dont need to change them all?

obj = GetGame().CreateObject("bldr_mil_fortified_nest_small", "2671.812744 6.813721 2014.172852"); obj.SetOrientation("-172.000031 0.000000 0.000000"); obj.SetPosition("2671.812744 6.813721 2014.172852"); obj = GetGame().CreateObject("bldr_roadblock_bags_long", "2658.027344 6.201794 2011.135742");

GravityWolfNotAmused commented 5 years ago

new SpawnedBuilding("bldr_mil_fortified_nest_small", "2671.812744 6.813721 2014.172852", "-172.000031 0.000000 0.000000"),

Would be how you would add the first object to tunables.c. There is an example one there: https://github.com/Da0ne/DZMods/blob/803b820428424aef48a71656ddde6733b7c94f23/mpmissions/DayZSurvival.chernarusplus/ScriptedMods/Tunables.c#L86

sy8282 commented 5 years ago

So I would need to edit everything I've already done? Is there no way to set a seperate file to load the old format, I've got 2600 lines on code in my current file

GravityWolfNotAmused commented 5 years ago

You copied and pasted the same thing for 2600 lines of code, it's not like you came up with the idea of the solution. All you need is the building name, the position, and the orientation instead of adding 6 function calls each time you want a building.

sy8282 commented 5 years ago

Not all the same thing obviously but as I spawned them all in on an earlier version of the com editor so what I'm asking is can the old old not be used or do I need to edit every spawned item to match the new format