Jump to content

SCENERY REMOVE OBJECTS ZONE and dedicated server


Mauritz

Recommended Posts

So using the trigger action to remove sceneryobjects works fine single, hosted muiltiplayer, but not in the dedicated enviroment. Tested a few variations of trigger conditions, but to no avail.

 

Tried working around it with scripting to destroy the objects but I am unable to capture the concrete dividers that plague syrian roads with world.searchObjects.

 

So steps to reproduce:
1. Make a mission with remove scenery objects in triggers

2. Test mission from ME, watch objects disappear

3. Host mission from client, watch objects disappear

4. Run mission on dedicated server, get offended by the existence of scenery objects

 

Possible workaround:

Put invisible Farps next to every object or tree you want to remove

syria-roadbase_RB-15.miz

  • Like 1
Link to comment
Share on other sites

It needs to be done in code, for example, I get rid of all of the sand style shelters at airfields on Syria at mission start because they cause a nightmare of problems for real life sized aircraft. It's actually quite simple, I don't mind sharing how I do that so you get the jist....

 

local function deleteHangers(zone_name)    
	local zoneObject = ZONE:FindByName(zone_name)
	local sphere = {point=zoneObject.Zone.point,radius=zoneObject.Zone.radius}
	local volS = {
			id = world.VolumeType.SPHERE,
			params =
			{
					point = sphere.point,
					radius = sphere.radius*0.9,
			},
	}
	local ifFound = function(foundItem, v)
		if string.sub(foundItem:getTypeName(),1,5)=='HANGA' then
			foundItem:destroy()
		end
	end
	world.searchObjects(5, volS, ifFound)
end

if jsbFM.PHN() == '_PHS' then
	deleteHangers("Save_PAL")
	deleteHangers("Save_TAB")
	deleteHangers("Save_ALQ")
	deleteHangers("Save_REN")
	deleteHangers("Save_HAM")
end

 

  • Like 1

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

Link to comment
Share on other sites

Thank you for your input, Pravus

 

On 3/25/2021 at 5:33 PM, PravusJSB said:

It needs to be done in code, for example, I get rid of all of the sand style shelters at airfields on Syria at mission start because they cause a nightmare of problems for real life sized aircraft. It's actually quite simple, I don't mind sharing how I do that so you get the jist...

 

 

That looks a lot like the scripts floating around, on the hoggit wiki for example. Tried those, captures buildings alright, doesn't grab the dividers, safety rails, walls, and lamp posts etc. Here I'll include a picture of the results of running a version of your script that just :destroy() everything it finds. As you can see it removes the buildings, but not the things I'm actually looking to get rid off.

20210326232525_1.jpg

Link to comment
Share on other sites

If I try to capture their deaths i get

 

2021-03-26 23:27:17.719 INFO    SCRIPTING: DEBUG: Killed - APC M1025 HMMWV Type - Hummer Category - 2
2021-03-26 23:27:17.727 INFO    SCRIPTING: DEBUG: Killed -  Type - ROADBARRIER Category - 4
2021-03-26 23:27:28.720 INFO    SCRIPTING: DEBUG: Killed - Transport M818 Type - M 818 Category - 2
2021-03-26 23:28:28.120 INFO    SCRIPTING: DEBUG: Killed -  Type - HIGHWAYBARRIER Category - 4
2021-03-26 23:28:28.122 INFO    SCRIPTING: DEBUG: Killed -  Type - ROADBARRIER Category - 4
2021-03-26 23:28:28.125 INFO    SCRIPTING: DEBUG: Killed -  Type - HIGHWAYBARRIER Category - 4
2021-03-26 23:28:28.139 INFO    SCRIPTING: DEBUG: Killed -  Type - ROADBARRIER Category - 4
2021-03-26 23:28:28.142 INFO    SCRIPTING: DEBUG: Killed -  Type - HIGHWAYBARRIER Category - 4
2021-03-26 23:28:28.146 INFO    SCRIPTING: DEBUG: Killed -  Type - ROADBARRIER Category - 4

 

That's using the :getDesc() so the categories don't really match up, the hummer is a unit and the m818 is a static for instance.

The scenery objects are nameless, of course, I'm at a loss exaclt how the trigger action "Object Scenery Remove" actually works to catch those objects, since it is able to remove them.

 

I assume I can pull some more info from the raw object table that might help narrow it down. Anyone got any further ideas?

Link to comment
Share on other sites

  • 2 weeks later...

but im using a string condition to match the hangers.. It's not copied from anywhere it's the standard search functionality of the SSE and how ED expects a search opbject param to work and look. If you want to get specific buildings then find specific names and use the string.sub as I did to isolate.

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

Link to comment
Share on other sites

On 4/4/2021 at 7:29 PM, PravusJSB said:

but im using a string condition to match the hangers.. It's not copied from anywhere it's the standard search functionality of the SSE and how ED expects a search opbject param to work and look. If you want to get specific buildings then find specific names and use the string.sub as I did to isolate.

 

I'm not using a string condition, I'm deleting everything it finds, and it's not finding those objects, in any category.

 

Here's a before picture in case it wasn't clear

20210409043937_1.jpg


Edited by Mauritz
Link to comment
Share on other sites

  • Recently Browsing   0 members

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