Jump to content
Sign in to follow this  
twistking

quick question on how to id terrain object

Recommended Posts

Hello,
i've got a very quick (hopefully) question. I want to set the tc-tower on cup chernarus2.0 to "featuretype 2" and tried the following:

placed a logic named "logic" near the tower.

tower_1 = nearestObjects [logic, ["Land_A_TVTower_base"], 200];
tower_2 = nearestObjects [logic, ["Land_A_TVTower_mid"], 200];
tower_3 = nearestObjects [logic, ["Land_A_TVTower_top"], 200];

tower_1 setFeatureType 2;
tower_2 setFeatureType 2;
tower_3 setFeatureType 2;

however the nearestObjects returns an array instead of an object, however i don't know how to extract the object from the array.
it's probably super easy, but i don't get it 😞

Share this post


Link to post
Share on other sites

☝️

(tower_1 select 0) setFeatureType 2;
(tower_2 select 0) setFeatureType 2;
(tower_3 select 0) setFeatureType 2;

OR

tower_1 # 0 setFeatureType 2;
tower_2 # 0 setFeatureType 2;
tower_3 # 0 setFeatureType 2;

 

  • Thanks 1

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
Sign in to follow this  

×