Jump to content

Is it possible to get the scripting commands for SCENERY REMOVE OBJECT ZONE


robgraham

Recommended Posts

Topic says it but Newy, Chiz, Nine, Grimes, whoever is it possible to find out if there is an scripting API command for SCENERY REMOVE OBJECTS ZONE ?

 

The command can clearly run AFTER mission start (you can set a timer and it'll remove objects in the zone when the timer kicks in) but looking at Hogget etc I can't find any scripting API command to access it from within a script. only the actions menu in the Triggers

 

there seems to be a number of trigger singletons that are now either not documented or missing...

i7 13700k, 64gb DDR5, Warthog HOTAS, HP Reverb G2 VR, win 11, RTX 3070

TGW Dedicated Server Admin, Australian PVE/PVP gameplay. (taskgroupwarrior.info/2020)

Link to comment
Share on other sites

And if it's not, same thing with Scenery destruction, weather and such items (not to derail) I'd certainly find them useful to have API's that we can use to enhance missions after first launch via script.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Last time I checked, scenery could only be removed via ME (using SCENERY REMOVE OBJECTS ZONE)

 

I tried to remove scenery objects via scripting, to no avail. The most I could do was detect certain scenery objects... :destroy() didn't work on them.

 

That's why we are asking if the SCRIPT commands can be given, Tigger.Action.SceneryRemoveObjectsZone(zone) or something.. almost all of the other Triggers have a Script equivilent that is documented but some of the newer items don't.

 

There should in theory be lua commands for them given that the mission is calling the commands and the triggers can be called after the fact, the issue though is that the triggers via ME are limited to what you put into the ME so if you have anything Dynamic it's pointless.

 

Were as if we want to run say a script that allows you to have engineers go blow up tree's so they can set up a FARP or something, I can do everything but having the tree's blow up IN script.

i7 13700k, 64gb DDR5, Warthog HOTAS, HP Reverb G2 VR, win 11, RTX 3070

TGW Dedicated Server Admin, Australian PVE/PVP gameplay. (taskgroupwarrior.info/2020)

Link to comment
Share on other sites

The main way would be to use world.searchObjects in combination with a destroy() call. However destroying world objects hasn't really worked since 1.5 or 2.0. That said it can't detect trees and there is no function to "destruct" the objects so there is rubble remaining. Well aside for causing an explosion, but I mean there is no scripting equivalent to "Scenery Destruction Zone" where the objects get set to a destroyed state.

 

There are bug reports and feature requests in the system for that.... but they seem to be low priority.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 6 months later...

So I'm trying to do a similar thing, but it won't work. So I don't mind creating an explosion at a specific location to make it happen. However, what I have is a table full of object ID's from scenery objects (houses, bridges, etc). This table is generated by my script as the mission moves along.

 

 

At a later time I'd like to make these objects explode. Again, all I have is their object ID number. I can't seem to find a function where I can get info about a scenery object based on its ID number alone. Ideally I'd love to do something like 987654321:destroy(), or 987654321:getPoint() so that I can use the point in trigger.action.explosion.

 

 

Any idea how I can pull information about an scenery object based on its ID alone?

 

 

Much TIA!

-GT-

My DCS Missions: Band of Buds series | The End of the T-55 Era | Normandy PvP | Host of the Formation Flight Challenge server

 

Supercarrier Reference Kneeboards

 

IRL: Private Pilot, UAS Test Pilot, Aircraft Designer, and... eh hem... DCS Enthusiast

Link to comment
Share on other sites

So, after banging my head for hours, the solution always comes IMMEDIATELY after you ask about it in the forums. I got it working.

 

 

The UNIT for the object is {id_ = 987654321}.

 

 

So, set myUnit = {id_ = 987654321} and...

 

 

You can get its point with myPoint = Object.getPoint(myUnit)

 

 

AND

 

 

You can also destroy (remove it, without rubble) from the map with Object.destroy(myUnit)

 

 

I just tested both now, and they work.

 

 

Enjoy,

:)

My DCS Missions: Band of Buds series | The End of the T-55 Era | Normandy PvP | Host of the Formation Flight Challenge server

 

Supercarrier Reference Kneeboards

 

IRL: Private Pilot, UAS Test Pilot, Aircraft Designer, and... eh hem... DCS Enthusiast

Link to comment
Share on other sites

So, after banging my head for hours, the solution always comes IMMEDIATELY after you ask about it in the forums. I got it working.

 

 

The UNIT for the object is {id_ = 987654321}.

 

 

So, set myUnit = {id_ = 987654321} and...

 

 

You can get its point with myPoint = Object.getPoint(myUnit)

 

 

AND

 

 

You can also destroy (remove it, without rubble) from the map with Object.destroy(myUnit)

 

 

I just tested both now, and they work.

 

 

Enjoy,

:)

 

I assume this is SP only?

 

 

 

 

EDsignaturefleet.jpg

Link to comment
Share on other sites

Object.destroy() was supposed to be fixed for scenery objects in the last patch for singleplayer and multiplayer. Still hoping for something to set the objects to a wrecked state.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

I haven’t tried MP with this script yet. I have been using explosion power 1000 at the objects’ VEC3’s at mission start to set them to rubble.

My DCS Missions: Band of Buds series | The End of the T-55 Era | Normandy PvP | Host of the Formation Flight Challenge server

 

Supercarrier Reference Kneeboards

 

IRL: Private Pilot, UAS Test Pilot, Aircraft Designer, and... eh hem... DCS Enthusiast

Link to comment
Share on other sites

  • Recently Browsing   0 members

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