gtasearcher Posted April 7, 2009 Share Posted April 7, 2009 (edited) Why aren't you implementing the AI Car Drive? It's damn easy, I made a simple CLEO that, when you press HOME, you start it, press X to choose starting pos, then press X to choose the ending pos, then press X to view a short 7,5 seconds movie of the car driving itself thru the planned route. Here's a vid: And here's the source code: {$CLEO .cs}thread 'TEST'jump @1:1wait 0if0AB0: 36jf @1if0449: actor $PLAYER_ACTOR in_a_car jf @1wait 003C0: [email protected] = actor $PLAYER_ACTOR carwait 0gosub @defwait 0gosub @2Car.StorePos([email protected], [email protected], [email protected], [email protected])[email protected] = Car.Angle([email protected])wait 1000gosub @2CAR.StorePos([email protected], [email protected], [email protected], [email protected])wait 1000gosub @2wait 0fade 0 1500wait 15000792: disembark_instantly_actor $PLAYER_ACTOR wait 0Car.PutAt([email protected], [email protected], [email protected], [email protected])cAR.Angle([email protected]) = [email protected] 0Car.DriveTo([email protected], [email protected], [email protected], [email protected])wait 00679: put_camera_on_car [email protected] with_offset 5.0 7.0 0.0 rotation 0.0 0.0 0 0.0 2wait 0fade 1 1500wait 002A3: enable_widescreen 1 wait 7500fade 0 1500wait 1500Car.RemoveReferences([email protected])fade 1 1500wait 002A3: enable_widescreen 0Camera.Restore()wait 0jump @1 :2wait 0if0AB0: 88jf @2return:defwait 0if856E: not car [email protected] defined 0AA1: return_if_falsewait 0jump @def Edited April 8, 2009 by gtasearcher Link to comment Share on other sites More sharing options...
Sniputer Posted April 7, 2009 Share Posted April 7, 2009 So if this makes it to DYOM, the car driving animation is possible? Link to comment Share on other sites More sharing options...
PatrickW Posted April 7, 2009 Share Posted April 7, 2009 (edited) We have similar code already, even a bit more sophisticated, with multiple route-points. But the problem is that in DYOM, many more factors have to be taken into consideration, for example the fact that the car may have to drive into an area that the player hasn't visited yet. This can cause serious problems, as the collision models of the roads aren't loaded than, so the vehicle will sink through the floor. But even that will be solvable. Furthermore it will have to be integrated in the whole DYOM environment: menu's, memory-storage, file-storage. Also editing/deleting have to be implemented. It's quite easy to create such a simple sandbox proto-type (which we are more than capable to do), but it's much harder to get it integrated and working in all possible circumstances. But you can be assured that such functionality will be available in the V5 release, as we've said before. BTW: Why are you putting a "wait 0" on every other line of your CLEO script ? Edited April 7, 2009 by PatrickW Link to comment Share on other sites More sharing options...
Sniputer Posted April 7, 2009 Share Posted April 7, 2009 Yay, car thing confirmed. Now all we need to know when this V5 will come? Link to comment Share on other sites More sharing options...
TNTX32 Posted April 7, 2009 Share Posted April 7, 2009 I wonder why a lot of good ideas will be only released in the 5.0. But it's SOMETHING, it's not bad But yes, PatrickW is alright about the car problem. The LOCATION of where the car go, the ROUTE, the PATH and everything else needs to be STORED in a .DAT. And you will also can Edit and Delete it! So it's not that easy. Link to comment Share on other sites More sharing options...
gtasearcher Posted April 8, 2009 Author Share Posted April 8, 2009 (edited) BTW: Why are you putting a "wait 0" on every other line of your CLEO script ? I know I shouldn't, but when I was a newbie in scripting, I forgot to put a "wait 0" in my loops, which caused my game always to crash without warning --> had to restart the PC --> sometimes the PC will not work anymore.... And now, for safety, I use load's o' waits... The LOCATION of where the car go, the ROUTE, the PATH and everything else needs to be STORED in a .DAT. {$CLEO .cs}thread 'TEST'jump @1:1wait 0if0AB0: 36jf @1if0449: actor $PLAYER_ACTOR in_a_car jf @1wait 003C0: [email protected] = actor $PLAYER_ACTOR carwait 0gosub @defwait 00A99: chdir 1 // User Files Directorywait 0if0AAB: file_exists "car_route.dat"thenwait 0repeatwait 00A9A: [email protected] = openfile "car_route.dat" mode 0x6272 // opens the file for binary readinguntil 0A9A: [email protected] = openfile "car_route.dat" mode 0x6272 // checks the open of the file for binary readingwait 00A9D: readfile [email protected] size 4 to [email protected]: readfile [email protected] size 4 to [email protected]: readfile [email protected] size 4 to [email protected]: readfile [email protected] size 4 to [email protected]: readfile [email protected] size 4 to [email protected]: readfile [email protected] size 4 to [email protected]: readfile [email protected] size 4 to [email protected] 00A9B: closefile [email protected] 0jump @car_driveendwait 0gosub @2Car.StorePos([email protected], [email protected], [email protected], [email protected])[email protected] = Car.Angle([email protected])wait 1000gosub @2CAR.StorePos([email protected], [email protected], [email protected], [email protected])wait 1000gosub @2wait 0jump @car_drive:car_drivewait 0fade 0 1500wait 15000792: disembark_instantly_actor $PLAYER_ACTOR wait 0Car.PutAt([email protected], [email protected], [email protected], [email protected])cAR.Angle([email protected]) = [email protected] 0Car.DriveTo([email protected], [email protected], [email protected], [email protected])wait 00679: put_camera_on_car [email protected] with_offset 5.0 7.0 0.0 rotation 0.0 0.0 0 0.0 2wait 0fade 1 1500wait 002A3: enable_widescreen 1 wait 7500fade 0 1500wait 1500Car.RemoveReferences([email protected])fade 1 1500wait 00A99: chdir 1 // User Files Directorywait 0repeatwait 00A9A: [email protected] = openfile "car_route.dat" mode 0x6277 // opens the file for binary writinguntil 0A9A: [email protected] = openfile "car_route.dat" mode 0x6277 // checks the open of the file for binary writingwait 00A9E: writefile [email protected] size 4 from [email protected]: writefile [email protected] size 4 from [email protected]: writefile [email protected] size 4 from [email protected]: writefile [email protected] size 4 from [email protected]: writefile [email protected] size 4 from [email protected]: writefile [email protected] size 4 from [email protected]: writefile [email protected] size 4 from [email protected] 00A9B: closefile [email protected]: enable_widescreen 0wait 0jump @1 :2wait 0if0AB0: 88jf @2return:defwait 0if856E: not car [email protected] defined 0AA1: return_if_falsewait 0jump @def Edited April 8, 2009 by gtasearcher Link to comment Share on other sites More sharing options...
PatrickW Posted April 8, 2009 Share Posted April 8, 2009 What's your point ? Did you really think that we don't know how to store 8 variables in a file ? Link to comment Share on other sites More sharing options...
gtasearcher Posted April 8, 2009 Author Share Posted April 8, 2009 What's your point ? Did you really think that we don't know how to store 8 variables in a file ? Nope, I was just answering TNTX32 afirmation. Link to comment Share on other sites More sharing options...
TNTX32 Posted April 8, 2009 Share Posted April 8, 2009 What's your point ? Did you really think that we don't know how to store 8 variables in a file ? Nope, I was just answering TNTX32 afirmation. I don't know anything about CLEO Coding... But just wait for 5.0! After all the best of all is to wait for a better thing! Link to comment Share on other sites More sharing options...
12jango Posted April 10, 2009 Share Posted April 10, 2009 Yeah, happy new year. Link to comment Share on other sites More sharing options...
Sniputer Posted April 10, 2009 Share Posted April 10, 2009 HAPPY NEW YEAR? WHAT THE...? Link to comment Share on other sites More sharing options...
TNTX32 Posted April 10, 2009 Share Posted April 10, 2009 (edited) 12jango, this is not the attention whore forum, STFU and GTFO Edited April 10, 2009 by TNTX32 Link to comment Share on other sites More sharing options...
12jango Posted April 11, 2009 Share Posted April 11, 2009 (edited) You're welcome. I really hope that the version 5 have those features, actors driving cars. That would be great! Edited April 13, 2009 by 12jango Link to comment Share on other sites More sharing options...
TNTX32 Posted April 13, 2009 Share Posted April 13, 2009 I think oldmans riding their bicycles would be good first. Link to comment Share on other sites More sharing options...
Ragga1 Posted April 13, 2009 Share Posted April 13, 2009 I think oldmans riding their bicycles would be good first. Uhh, what`s the difference?Just a different ped and vehicle model... Link to comment Share on other sites More sharing options...
TNTX32 Posted April 19, 2009 Share Posted April 19, 2009 Not if a fireman drives a Stunt Plane. Link to comment Share on other sites More sharing options...
Ragga1 Posted April 19, 2009 Share Posted April 19, 2009 Not if a fireman drives a Stunt Plane. As far as I remember, it`s basically different handling. Link to comment Share on other sites More sharing options...
_-=Zombie=-_ Posted April 19, 2009 Share Posted April 19, 2009 handling has nothing to do with the drivers of the vehicles. unless you mean something else Link to comment Share on other sites More sharing options...
TNTX32 Posted April 20, 2009 Share Posted April 20, 2009 No. The fireman is a SPECIAL ACTOR - And the Stunt Plane is not a normal vehicle: It needs special paths and special flying parameters. Link to comment Share on other sites More sharing options...
Recommended Posts