Jump to content
st_dux

Lack of map object interaction/IDs in Eden

Recommended Posts

May I ask why this was changed? Interacting with map objects was useful: One way I used this feature was to attach waypoints to buildings that would run a script to automatically have the group with that waypoint occupy the building positions found at the attached building. Now this script requires that I have the building named; I cannot simply attach a waypoint to it in the editor. Of course, naming this building will be more difficult now, too, because object IDs are gone. Am I supposed to just use nearestObject on a game logic placed near the center of the building now and hope that nothing besides the building I want is closer? If I want to check if a bridge is destroyed now, for example, how would I go about finding the object to check? 

Share this post


Link to post
Share on other sites

The devs have explained long time ago that map object IDs are currently unreliable and to make them so is a daunting task. So, use nearestObject for identification instead.

Using it myself.

Share this post


Link to post
Share on other sites

Given this reasoning, would it be possible for us to get a way to detect the classname of a particular building or object on the map just by looking at it?

A dirty hacky trick:

1. Open the debug console.

2. Type to the watch field:

typeof nearestobject screenToWorld getMousePosition

3. Move the mouse cursor on an object.

 

If you want to copy the name, first click on the field where the classname appears, point at the object, press Home, hold shift, press End, release shift, press Ctrl+C.

:D

 

More complex line that doesn't return nearby classnameless objects:

typeof (nearestobjects [screenToWorld getMousePosition,[],10] select {typeof _x != ""} select 0)

(I know there probably are better ways for this)

  • Like 1

Share this post


Link to post
Share on other sites

Here's some reasoning behind our decision to discontinue the feature.

 

Thanks for the explanation. This does make sense for discontinuing the use of IDs, although it seems like attaching things to map objects could still be usable. Regardless, this is a really minor thing at the end of the day, I suppose.

Share this post


Link to post
Share on other sites

Can somebody explain step by step how to use nearestObject in lieu of grouping a trigger to a map object? I'm just trying to blow up buildings and radio towers on Stratis.

Share this post


Link to post
Share on other sites

Nevermind, got it working with some major help from Caboose816. You sir are a gentleman and a scholar. For any fellow noobs who want to link map objects to triggers post Eden update (in this case, to destroy them), here's how we did it.
 
1. Find out the classname of the object you want to destroy. You can use the Eden editor to find objects pretty quickly, especially using the search function. Say we want to blow up one of the large comm towers on Stratis. Type tower in the search field of the editor and then place a few of them until you see the desired tower. Hover your cursor over it and voila, there's your classname. In this case, the large comm tower is Land_TTowerBig_1_F.

 

Alternatively, you can use this very handy page to find virtually every object's classname and it's image: http://https://community.bistudio.com/wiki/Arma_3_Assets

 

2. Create a Game Logic and name it.

3. In the Game Logic's init field put the following:

variableName = nearestObject [nameofgamelogic, "***CLASS NAME OF OBJECT***"];

The variableName can be whatever you like, as can the Game Logic name. For our tower example it will look like this:

tower = nearestObject [logic1, "Land_TTowerBig_1_F"];

4. Create a trigger

5. In the trigger condition field put the following:

!alive tower;

6. Enjoy

 

Again, credit to Caboose816 for helping me out.

  • Like 1

Share this post


Link to post
Share on other sites

I tried the above intrustion from Orion with no luck. But its ok..

 

My real question is.. 

 

1. Can I delete fences like before, without using the ID?

 

2. If i delete objects with ID will it revert the removal after the 2D editor stops being supported?

 

3. Is there any way to delete lets say all structures within a radius.

Share this post


Link to post
Share on other sites
Guest

I too would like to know what happens in future updates with using object ID's to destroy vegetation/fences/etc on a map - as my mission uses this method to clear out an area for a base I plan on constructing on Utes from AiATp  - does this mean at some point the use of ID's in code, like using NearestObject with object Id's in the example below will no longer function?

 

{([3660,3518,18] nearestobject _x) setDammage 1} ForEach
[

5537,5536,5535,5512,5418,5420,5419,5423,5421,5422,5532,5531,5533,5534,5538,5539,5637,5634,5635,5636,5639,5638,5562,5549

];

 

And if indeed Id's will no longer work at all with such commands, does this leave any way to acess/destroy/etc vegetation/etc (apart from scripting in dropping bombs on the stuff, although I don't know if that may leave crater textures..)?

 

/Edit

 

Didn't realize that dropping bombs on the vegetation would destroy everything else around it too lol - guess that is not a realistic alternative

Share this post


Link to post
Share on other sites

Nevermind, got it working with some major help from Caboose816. You sir are a gentleman and a scholar. For any fellow noobs who want to link map objects to triggers post Eden update (in this case, to destroy them), here's how we did it.

 

1. Find out the classname of the object you want to destroy. You can use the Eden editor to find objects pretty quickly, especially using the search function. Say we want to blow up one of the large comm towers on Stratis. Type tower in the search field of the editor and then place a few of them until you see the desired tower. Hover your cursor over it and voila, there's your classname. In this case, the large comm tower is Land_TTowerBig_1_F.

 

Alternatively, you can use this very handy page to find virtually every object's classname and it's image: http://https://community.bistudio.com/wiki/Arma_3_Assets

 

2. Create a Game Logic and name it.

3. In the Game Logic's init field put the following:

variableName = nearestObject [nameofgamelogic, "***CLASS NAME OF OBJECT***"];

The variableName can be whatever you like, as can the Game Logic name. For our tower example it will look like this:

tower = nearestObject [logic1, "Land_TTowerBig_1_F"];

4. Create a trigger

5. In the trigger condition field put the following:

!alive tower;

6. Enjoy

 

Again, credit to Caboose816 for helping me out.

lacked put the same name of "GAME LOGIC" within the field.

Name Game Logic = ABC

*Place the icon "LOGIC GAME" on the building to be destroyed.

 

 

INIT GAME LOGIC: 

 

TOWER = nearestObject [ABC, "Land_TTowerBig_1_F"];

 

 

TRIGGER

COND:  !alive TOWER;

 

Share this post


Link to post
Share on other sites

It was the only way to edit terrains objects in a clear way without using scripting commands.. So bad for me

I really hope that the devs will reconsider removing this feature.. Otherwise my mission will be simply f***** up.

Share this post


Link to post
Share on other sites

lacked put the same name of "GAME LOGIC" within the field.

Name Game Logic = ABC

*Place the icon "LOGIC GAME" on the building to be destroyed.

 

 

INIT GAME LOGIC: 

 

TOWER = nearestObject [ABC, "Land_TTowerBig_1_F"];

 

 

TRIGGER

COND:  !alive TOWER;

 

Hence my example, and my labeling it nameofgamelogic, and me stating that you can name it whatever you want, just like the variablename. But hey, whatever helps folks out.

Share this post


Link to post
Share on other sites

A simple solution which seems to work at least for most buildings is to just put a logic down on each house you want to destroy and in the logic init put:

 

dobject = getpos this nearestObject "house";  dobject setDamage 1; 

 

You don't need to name the logic you can just copy and paste the logic onto every building you want to destroy. You may need to put a few down on some buildings with multiple 'parts'.

 

In cases where the building is unknown type do this. Drop down a unit and in units init put: 

 

null= [] spawn {while {true} do { hint format ["%1",cursortarget] ;sleep 0.2}}

 

Now right click on character and select play as character. Point at the object and the type will be hinted on screen. Or go to http://www.sirlondon.net/arma3/library.phpto get most building names.

 

Then once you have the specific building name simply replace 'house' with that name: i.e. in logic put :

dobject = getpos this nearestObject "Land_Dome_Big_F"; dobject setdamage 1;

 

That would take down the big white military industrial dome for example. 

 

 

 

 

 

Share this post


Link to post
Share on other sites

All of this is good and thanks for it, but the problem I'm having is I want to blow a lot of shit up. I used to be able to simply copy paste a 0 health trigger to everything I wanted to, is there a fast way to blow up about half a city without literally blowing up half a city?

Share this post


Link to post
Share on other sites

All of this is good and thanks for it, but the problem I'm having is I want to blow a lot of shit up. I used to be able to simply copy paste a 0 health trigger to everything I wanted to, is there a fast way to blow up about half a city without literally blowing up half a city?

This works:

Share this post


Link to post
Share on other sites

I have been looking for a long time how to remove buildings, and other objects from the map to customize a few things for myself.

 

I see older topics using the init.sqf file, but the notes.txt is gone now after the latest apex updates (To date)

I would love to just simply right click on the building and hit delete. There is no way from the videos i saw.

 

Blowing shit up makes good sense, so removing objects is not possible? we just have to make a brand new map i suppose?

 

Just getting into the apex editor and already i cant do what i was hoping to do today. Sad face

Share this post


Link to post
Share on other sites

initPlayerLocal.sqf

{
_x hideObject true;
 false
} count (nearestTerrainObjects [position player, ["house"],200]);

Replace "house" with the class of the buildings you want to be removed, change the radius and instead of player, use a fixed a position on the map.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×