Jump to content
Barba-negra

Attacth TO nearEntities

Recommended Posts

Hello friends how are you? I come to ask if it is possible to make an attachTo an enemy without a variable name, either a unit or a vehicle, I have this in mind but it really does not work

 

_list = fijado nearEntities [["Car", "Motorcycle", "Tank", "Man"], 100];
{

fijado attachTo [_list, [0, 0, 0] ];

};

Share this post


Link to post
Share on other sites

Hello. What do you want to obtain? attachTo  needs an object, not a list...

What do you want to attach on what?

Share this post


Link to post
Share on other sites
22 minutes ago, pierremgi said:

Hello. What do you want to obtain? attachTo  needs an object, not a list...

What do you want to attach on what?

If I know it's complicated, I want to create like a magnet, an object that joins or a vehicle when the vehicle passes by, but my intention is to do it with any vehicle without having to give it a variable name

Share this post


Link to post
Share on other sites
7 hours ago, Barba-negra said:

If I know it's complicated, I want to create like a magnet, an object that joins or a vehicle when the vehicle passes by, but my intention is to do it with any vehicle without having to give it a variable name

 

Have a look at the forEach command. It lets you execute a command on items in an array (which your list of objects is)

  • Like 1

Share this post


Link to post
Share on other sites

If I understand, you want to attach an object named fijado when some enemy close its position.

 

If yes, you can place a trigger on fijado position, with a little area, OPFOR or BLUFOR or .... PRESENT, server only

then in on activation field:

fijado attachTo [thislist select 0, [0,0,2]]

 

The result is not beautiful because you can't guess the "offset" or the "memory point" on the enemy, if you want to match all kind of enemies.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

It's a good idea I'll try to see what the result is and I'll tell you guys

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

×