odiomoratti Posted February 1, 2011 Share Posted February 1, 2011 I've tried with this [...]ped1 = World.GetRandomPed(Player.Character.Position, 20.0f);blip1 = ped1.AttachBlip();[...] With this code i get a "blipped" random ped for 2 seconds....then the blip disappears. Don't know why. Moreover when i quit the game there's a kind of freeze....i've to quit with ctrl+alt+canc.....I'm sure the entire code is not wrong because if i change just the random ped part with a World.CreatePed etc. the script works fine and the game quits normally. I'd like to get a random ped in a random position in one of the 4 islands.....so 20 as radius is low i know....but if i increase it then i don't see the blip even for a second. I think it's because the game try to pick a ped in some parts of the city that haven't been loaded yet....but that's just my guess. Thanks in advance. Link to comment https://gtaforums.com/topic/468743-chow-to-get-a-random-ped-and-attach-a-blip/ Share on other sites More sharing options...
Intosia Posted February 1, 2011 Share Posted February 1, 2011 Thats right, there is 'no life' in the parts that you are not.... Otherwise the game would be unplayable. The game streams 'life' into view when you drive through the streets. It calculates in a sphere around you. Link to comment https://gtaforums.com/topic/468743-chow-to-get-a-random-ped-and-attach-a-blip/#findComment-1060321337 Share on other sites More sharing options...
odiomoratti Posted February 1, 2011 Author Share Posted February 1, 2011 Thats right, there is 'no life' in the parts that you are not.... Otherwise the game would be unplayable. The game streams 'life' into view when you drive through the streets. It calculates in a sphere around you. So there's no way? Link to comment https://gtaforums.com/topic/468743-chow-to-get-a-random-ped-and-attach-a-blip/#findComment-1060321466 Share on other sites More sharing options...
Intosia Posted February 1, 2011 Share Posted February 1, 2011 Well i think it should work atleast until the ped get removed by the game > when you get to far away from it. Dont know if the code is right (not coding for a while now), but looks good. What i would do is just place a Blip at a coord on a other island/part of the city, and when you get close switch it to a ped. Link to comment https://gtaforums.com/topic/468743-chow-to-get-a-random-ped-and-attach-a-blip/#findComment-1060321501 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now