Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Driving Cars


gtasearcher
 Share

Recommended Posts

gtasearcher

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 by gtasearcher
Link to comment
Share on other sites

So if this makes it to DYOM, the car driving animation is possible?

Link to comment
Share on other sites

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 by PatrickW
bS8xA.png
Link to comment
Share on other sites

Yay, car thing confirmed. Now all we need to know when this V5 will come?

Link to comment
Share on other sites

I wonder why a lot of good ideas will be only released in the 5.0.

 

But it's SOMETHING, it's not bad colgate.gif

 

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

gtasearcher

 

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 by gtasearcher
Link to comment
Share on other sites

What's your point ?

 

Did you really think that we don't know how to store 8 variables in a file ? suicidal.gif

 

 

bS8xA.png
Link to comment
Share on other sites

gtasearcher
What's your point ?

 

Did you really think that we don't know how to store 8 variables in a file ? suicidal.gif

Nope, I was just answering TNTX32 afirmation.

Link to comment
Share on other sites

 

What's your point ?

 

Did you really think that we don't know how to store 8 variables in a file ?  suicidal.gif

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

12jango, this is not the attention whore forum, STFU and GTFO sleepy.gif

Edited by TNTX32
Link to comment
Share on other sites

You're welcome.

I really hope that the version 5 have those features, actors driving cars. That would be great! alien.gifalien.gif

Edited by 12jango
Link to comment
Share on other sites

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

Not if a fireman drives a Stunt Plane. bored.gif

As far as I remember, it`s basically different handling.

Link to comment
Share on other sites

_-=Zombie=-_

handling has nothing to do with the drivers of the vehicles.

unless you mean something else

Link to comment
Share on other sites

No.

 

The fireman is a SPECIAL ACTOR - And the Stunt Plane is not a normal vehicle:

 

It needs special paths and special flying parameters.

 

suicidal.gif

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.