Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
jamesf1

Preventing Ground Damage

Recommended Posts

I've got an interesting request. I am trying to prevent an exploding chopper from creating (or otherwise deleting) a crater (both in texture, and in Arma2's funky way of churning up the ground).

Does anyone have any idea how to go about this? I still want the chopper to explode, etc. but preferably without said crater. I'm basically trying to preserve some helipads in a base if a chopper explodes whilst on top of/near them - as they then become fundamentally unusable.

Share this post


Link to post
Share on other sites

Just a suggestion but can you run a script when the chopper explodes, then using the nearestObjects command identify the crater and delete it using deleteVehicle

Share this post


Link to post
Share on other sites

Could do, I suppose, but have no idea what class type the crater is to be able to use nearestObjects on it. :shrug:

Share this post


Link to post
Share on other sites

Add a killed eventhandler to an aircraft and delete it when it is destroyed on the helipad?

Share this post


Link to post
Share on other sites

I know this is long winded but you could get the crater type doing a quick test.

1. Create a script with the following code

//Identify closest object
while {true} do
{	
//get all objects within a 5 metre radius
_all_objects = [];
_all_objects = nearestObjects [player, ["All"], 5]; 

if ((count _all_objects) > 1) then
{	
	//identify the closest object to player
	_closest_object = _all_objects select 1; 

	//find out its type 
	_object_type = typeOf _closest_object;

	//hint type
	hint format ["%1", _object_type];
};
sleep 2;
};

(I've just knocked this out at work so there could be syntax errors).

2. Get the player to run this code.

3. Destroy an AI chopper

4. Move up to the chopper and crater and find out what "type" the crater is

Edited by norrin

Share this post


Link to post
Share on other sites

Thanks, Norrin, I was having a bit of a slow night... and so hadn't done any investigation. I found the type for the crater being made, but out of interest, has anyone found out the hierarchical class structure yet? I'm looking for the parent for "CraterLong"... but it's not in the Armatech list or in the building class list in the sticky thread, here. It's also not, simply, "Crater" :(

Share this post


Link to post
Share on other sites

Apparently there's no 'helpful' parent. There are a bunch of types of crater, but they are all part of a broader effects category :( Thanks, though, norrin :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

×