OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Stim-Pack on 26 Jan 2003, 16:42:05

Title: remove buildings
Post by: Stim-Pack on 26 Jan 2003, 16:42:05
can you remove buildings already on the map... i searched everywhere on the forums and over internet i can't find out...  :'(

plz help
Title: Re:remove buildings
Post by: SharkDog on 26 Jan 2003, 17:10:51
As far as i know, you cant.
Title: Re:remove buildings
Post by: Chomps on 26 Jan 2003, 17:20:45
If you have Resistance...

Use the option on the side menu to display object IDs, zoom in on the object you want removed and note its ID number.  I am not sure if you can delete it, but you can move all the objects into the middle of the ocean.  Then in the init.sqs use the following line...

(object 1234567) setPos [0,0,0]

Except replace 1234567 with the ID number and 0,0,0 with the coordinates of a good out-of-the-way location.  This works on any map object from houses to lamp posts to sections of forest.

If you do not have Resistance you would probably have to use the nearestObject or whatever command to reference the the map object you want removed.



WARNING:

If you change the position of map objects they will remain changed for the player until he reloads the map!!  Basically, if your mission calls for all the buildings in Lipany to be moved to the ocean and the player plays your mission and then plays another one that is based in Lipany, none of the buildings will be there and that mission will get messed up.
Title: Re:remove buildings
Post by: Jester on 26 Jan 2003, 19:54:17
Does that mean that if you turn the street lamps "OFF" on Nogova for a night mission, that the lamps will always be "OFF" ? Just wondering. :-\
Title: Re:remove buildings
Post by: Stim-Pack on 27 Jan 2003, 02:58:33
thanks alot Chomps. I do have Res :)
Title: Re:remove buildings
Post by: Chomps on 27 Jan 2003, 06:23:42
Does that mean that if you turn the street lamps "OFF" on Nogova for a night mission, that the lamps will always be "OFF" ? Just wondering. :-\

Yes, I beleive the same applies to this.  The only settings that seem to always reset for map objects is setDammage and animation states.

If you want to knock out lights in a city, I would suggest using setDammage on them.  I believe setDammage .6 will turn off the light without knocking down the pole.  Note that there is a one or two minute delay before the light goes off after the setDammage command is run.