Grady Featherstone Posted September 16, 2012 Share Posted September 16, 2012 (edited) Hey everyone! I haven't really used the forums that much, so I apologise if this isn't the correct place to post this... but, I'm having a bit of a problem here... What I'm doing is spawning a normal Ped inside an interior ("Lucky Winkles" pub, it's in Algonquin sorta near the pay 'n' spray near The Triangle). Now sometimes when you go in there, there'll be a guy waiting to play darts with you, and someone working behind the bar, which says peds can function in there, but when I spawn a ped using Ped packie;packie = World.CreatePed("IG_PACKIE_MC", new Vector3(-431.03f, 452.71f, 10.40f)); It works (it's C#), and he's in the right spot, except on some angles he's invisible, and as I walk and move the camera around the area he will become visible for a split second, and then disappear again. One strange thing I noticed is, if I kill him, and then drive around the block and come back, I can see the body laying on the ground and it stays visible... Also, straight after I spawn him, if I go outside, I can see him through the windows all the time... I've noticed there are some problems with spawning objects/pickups and peds in interiors, but I spawned a ped in the same interior with the Simple Native trainer and I could see that ped fine, so my issue is at the point when I spawn it, but if the ped dies, then I can see him fine... strange.... Does anyone know what's going on and how I can fix this? Thanks a lot!!!! -Grady [EDIT] I just tried spawning him next to me outside of the pub, and then pushing him in through the door, and he seems to be appearing normally... This is definitely very strange... Edited September 16, 2012 by Grady Featherstone Link to comment Share on other sites More sharing options...
ch3y3zze Posted September 16, 2012 Share Posted September 16, 2012 (edited) do this when niko is indoor packie.CurrentRoom = Game.LocalPlayer.Character.CurrentRoom; yeah i guess outdoors is one room and indoors is another, so when u were outside u could see them because they were in your room ;D Edited September 16, 2012 by ch3y3zze Link to comment Share on other sites More sharing options...
Grady Featherstone Posted September 16, 2012 Author Share Posted September 16, 2012 That worked if I spawned him while I was in the interior, but if I was outside, and then went in, same problem, and I guess that makes sense as if I'm outside your setting the ped's world to "outside" so when I go in he doesn't appear properly.... Is there a way for it to work if I'm outside when he's spawned? I realised that if I spawn him outside and then set his position (basically teleport) him inside, then if I'm outside or inside it will work fine, but that's extra code which is a pain..... Link to comment Share on other sites More sharing options...
ch3y3zze Posted September 16, 2012 Share Posted September 16, 2012 That worked if I spawned him while I was in the interior, but if I was outside, and then went in, same problem, and I guess that makes sense as if I'm outside your setting the ped's world to "outside" so when I go in he doesn't appear properly.... Is there a way for it to work if I'm outside when he's spawned? I realised that if I spawn him outside and then set his position (basically teleport) him inside, then if I'm outside or inside it will work fine, but that's extra code which is a pain..... use a tick method and check for distance for ped and when close enough set his room maybe, yeah the point is to figure out to set his room when ur in the same room, u have to setup the logic but yeah that's how u can see him if u spawn while outside his room. Maybe u can say which room he is in but havent looked into it. Link to comment Share on other sites More sharing options...
Grady Featherstone Posted September 16, 2012 Author Share Posted September 16, 2012 Yeah thanks! I think I know a way I can incorporate that!!! Also, if I set his room to the interior, but then bring him out, will I be able to see him outside even if I don't reset his current room to a non-interior? Link to comment Share on other sites More sharing options...
ch3y3zze Posted September 16, 2012 Share Posted September 16, 2012 either the game takes over and sets his room or u have to, you'll find out when he walks outside Link to comment Share on other sites More sharing options...
Grady Featherstone Posted September 17, 2012 Author Share Posted September 17, 2012 Alright cool thanks for the help! You're a legend!!!! Link to comment 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