• 0
Sign in to follow this  
WD-40

[Solved] nearestObject [player, "Exile_Construction_Flag_Static"];

Question

Hi,

May I use:

  _Flag = nearestObject 150 [player, "Exile_Construction_Flag_Static"];

To search for flag within 150m radius?

Or rather:

  _Flag = nearestObject [player, "Exile_Construction_Flag_Static", 150];

Which one is correct?

Edited by WD-40

Share this post


Link to post
Share on other sites

4 answers to this question

  • 0
1 hour ago, WD-40 said:

Hi,

May I use:


  _Flag = nearestObject 150 [player, "Exile_Construction_Flag_Static"];

To search for flag within 150m radius?

Or rather:


  _Flag = nearestObject [player, "Exile_Construction_Flag_Static", 150];

Which one is correct?

Neither because the command nearestObject doesn't take a distance parameter. 

https://community.bistudio.com/wiki/nearestObject

Look at nearestObjects. 

https://community.bistudio.com/wiki/nearestObjects

_Flag = nearestObjects [player, ["Exile_Construction_Flag_Static"], 150];

 

Share this post


Link to post
Share on other sites
  • 0

Yeah but it's 2D only.  What if somone has flag on the ground and this command is run from ex. 4th floor?

I would have to mix them two.

Edited by WD-40

Share this post


Link to post
Share on other sites
Advertisement
  • 0
4 minutes ago, WD-40 said:

Yeah but it's 2D only.  What if somone has flag on the ground and this command is run from ex. 4th floor?

Wouldn't matter because the command is only looking at [x,y] of the player and the object. 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.