PlayPrey Posted September 1, 2014 Share Posted September 1, 2014 Sorry for asking a question without any reference code, but I just want to know if this is possible? Can I disable the pathing for a NPC? The results being that for example a driver will drive in a straight line to its goal, even if there is another NPC in the way, or a building. Anything about my question you don't understand, just ask Thank you Link to comment Share on other sites More sharing options...
Jitnaught Posted September 1, 2014 Share Posted September 1, 2014 Will the driver go through the buildings? Link to comment Share on other sites More sharing options...
PlayPrey Posted September 1, 2014 Author Share Posted September 1, 2014 No, if I were to tell him to go to the other side of a building with only 1 'destination', the driver would ram the building. I want to make my own kind of pathing if that makes sence, it will take time, but it is time Im willing to spend, lol. Link to comment Share on other sites More sharing options...
Jitnaught Posted September 1, 2014 Share Posted September 1, 2014 I believe there is a way. I can't exactly look at the natives for you, since I'm on my phone. Look at the parameters for Task.DriveTo (using IntelliSense or ILSpy), there should be a "follow paths" variable. Link to comment Share on other sites More sharing options...
Skorpro Posted September 2, 2014 Share Posted September 2, 2014 Task.DriveTo is using TASK_CAR_MISSION[...] natives. In your case TASK_CAR_DRIVE_TO_COORD(Ped, Car, X, Y, Z, Speed, 0, Model, DrivingStyle, 18, 45000); // 45000 => OffRoad is the better choice. leftas and Wiebrendh 2 Link to comment Share on other sites More sharing options...
PlayPrey Posted September 2, 2014 Author Share Posted September 2, 2014 I have never used natives like that before, and I cant find anything about it trough googling o.o (Im not a pro searcher, lol) Could you please provide an example on how to use it? Link to comment Share on other sites More sharing options...
Jitnaught Posted September 2, 2014 Share Posted September 2, 2014 (edited) I have never used natives like that before, and I cant find anything about it trough googling o.o (Im not a pro searcher, lol) Could you please provide an example on how to use it? This is how ScriptHookDotNet does it... //how it's calledint num2 = ObeyTrafficLaws ? 1 : 2;TaskCarMissionCoorsTarget(this.ped.Handle, Vehicle.Handle, Target.X, Target.Y, Target.Z, 4u, SpeedMph, (uint)num2, 5u, 10u);//the function and parametersstatic void TaskCarMissionCoorsTarget(Ped ped, Vehicle vehicle, f32 x, f32 y, f32 z, u32 unknown0_4, f32 speed, u32 ObeyTrafficLaws, u32 unknown3_5, u32 unknown4_10) { NativeInvoke::Invoke<ScriptVoid>("TASK_CAR_MISSION_COORS_TARGET", ped, vehicle, x, y, z, unknown0_4, speed, ObeyTrafficLaws, unknown3_5, unknown4_10); } Edited September 2, 2014 by LetsPlayOrDy Link to comment Share on other sites More sharing options...
Jitnaught Posted September 2, 2014 Share Posted September 2, 2014 Task.DriveTo is using TASK_CAR_MISSION[...] natives. In your case TASK_CAR_DRIVE_TO_COORD(Ped, Car, X, Y, Z, Speed, 0, Model, DrivingStyle, 18, 45000); // 45000 => OffRoad is the better choice. Why would TASK_CAR_DRIVE_TO_COORD require a model? Link to comment Share on other sites More sharing options...
NTAuthority Posted September 2, 2014 Share Posted September 2, 2014 Why would TASK_CAR_DRIVE_TO_COORD require a model?in case you'd want to use another CVehicleModelInfo's handling configuration? leftas 1 Inactive in GTA/R* title modification indefinitely pursuant to a court order obtained by TTWO. Good job acting against modding! Link to comment Share on other sites More sharing options...
Jitnaught Posted September 2, 2014 Share Posted September 2, 2014 Why would TASK_CAR_DRIVE_TO_COORD require a model? in case you'd want to use another CVehicleModelInfo's handling configuration? I guess that makes sense. 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