Jump to content

[solved]AddMinimumDistanceCheck & minimumDistance difference?


Faya

Recommended Posts

i'm confused between the 2, with mininumDistance i mean:                                                                         ⬇️Minimum distance.

SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300, 800));

 

and:

AddMinimumDistanceCheck(20f, SpawnPoint);

Never changed AddMinimumDistanceCheck since i found no reason to do so for it.

Edited by Faya

🇳🇱

Link to comment
Share on other sites

They are two different things: the first spawns a certain situation (for example a call) near the road (like a sidewalk), while the second is used to indicate a minimum limit with respect to your position in which to spawn a specific circumstance (example of that  previous one)

Link to comment
Share on other sites

  • Management Team

The first one changes you spawn point to a (street) position between 300-800 meters around the player.

The second on ensures the player is at least 20 meters away upon accepting the callout, automatically disregarding it if closer.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

  • The title was changed to [solved]AddMinimumDistanceCheck & minimumDistance difference?
On 11/19/2020 at 7:57 PM, LMS said:

The first one changes you spawn point to a (street) position between 300-800 meters around the player.

The second on ensures the player is at least 20 meters away upon accepting the callout, automatically disregarding it if closer.

I think the first one is bugged. Whenever I use that one the Callout still spawns super close (like around 50m away from the player), no matter which values I enter

Link to comment
Share on other sites

  • Management Team
2 hours ago, RicardaHub said:

I think the first one is bugged. Whenever I use that one the Callout still spawns super close (like around 50m away from the player), no matter which values I enter

 

Have you logged/blipped the positions it is returning to verify whether it is returning bad values? The code above should work fine.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

1 hour ago, LMS said:

 

Have you logged/blipped the positions it is returning to verify whether it is returning bad values? The code above should work fine.

Yeah I've set a random spawn location using the function above and added a Blip to that chosen location. It's always near me. Even if I put 500f, 1000f it would still spawn what seems like 10m away from me

 

Example:

 

SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300f, 500f));
...
Car = new Vehicle(SpawnPoint);
SpawnBlip = Car.AttachBlip();

Using that, my Callout still only spawns a few meters away from me

Link to comment
Share on other sites

  • Management Team

Not sure what is going on, that definitely works fine for me. Maybe the street function only considers very close nodes for whatever reason.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

On 11/23/2020 at 5:28 PM, LMS said:

Not sure what is going on, that definitely works fine for me. Maybe the street function only considers very close nodes for whatever reason.

I tried it again with 50f, 100f, 150f but all of those still spawn way too close.

 

I used that function to spawn a car 50f ... around me, however when it is actually called the car spawns right beside me 99% of the time

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...