Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      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

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

Make vehicles ignore paths when driving to a specified point


(insert name here)
 Share

Recommended Posts

(insert name here)

As I’ve started editing the main.scm and adding CLEO scripts to GTA 3, I’ve noticed that when I tell car to drive to certain coordinates, it will always find the nearest road and use that to get there. Typically this is good behavior; however, sometimes I need the car to drive directly to point I have specified and ignore all predefined paths in the map. So far I’ve been able to achieve this by creating a series of many points that are close together (or by using code to calculate and create all these points between two endpoints), but this is very tedious and makes my code messier than I’d prefer. I’ve been using two opcodes to make vehicles drive to specified points, which are 00A7 and 02C2. I’ve noticed no difference in their behavior, so I’m kind of wondering what the difference is there. I also suspect that the opcode 00AF might be the key to making a car ignore existing paths, but I’m not sure. I can’t find any information about that opcode online, so I have no idea what effects the number you enter into that opcode has. If anyone has any incite on how to make cars ignore existing paths or the functions of 00AF (or any similar opcodes), that’d be great.

Link to comment
Share on other sites

(insert name here)

That's a shame. I was able to find details about the 00AF opcode here, but none of them seemed to have the desired effect. I tried mission 14 (MISSION_GOTOCOORDS_ASTHECROWSWIMS), but it just made the car's front wheels turn around backwards and the car wouldn't move; presumably that vehicle mission is for boats and not cars. The most effective missions are 9 and 13 (MISSION_GOTOCOORDS_STRAIGHT and MISSION_GOTO_COORDS_STRAIGHT_ACCURATE) which seem to enlarge the area around the destination point where the car will ignore predefined paths and drive straight to the destination point (though it's still not a very big area). Based on the description the webpage I found gave of missions 8 and 12 (MISSION_GOTOCOORDS and MISSION_GOTOCOORDS_ACCURATE), I thought they would do what I want since the webpage says the car will drive to the destination point "from a far position", but they didn't seem to have much of an effect (if any) on the car behavior.

 

The reason I want to make cars ignore predefined paths is because I've converted the football stadium into a dirt bowl where I'm going to create Bloodring-esque side missions. The only problem is that all cars I create in the stadium immediately drive to the edge in an attempt to get back on the nearest road. Since paths are tied to the road models themselves, I'm thinking I might just edit the map layout and place pieces of road just beneath the stadium so that cars will follow the paths tied to these hidden road segments while inside the stadium. I know that this will also make cars spawn on these hidden pieces of road, but I think I should just be able to create a forbidden cars cube encasing the stadium to prevent that from happening. I think police cars can still spawn in forbidden car cubes when you have a wanted level, but this shouldn't matter because I will make your wanted level always be zero while you're participating in the Bloodring-esque missions.

 

I'm still curious what the difference between the 00A7 and 02C2 opcodes are if anyone knows.

Link to comment
Share on other sites

Unfortunately you can't place those pieces of roads under it. Game have a limit of ipls with paths assigned to it. Limits are so annoying. :sui:

Edited by AdusPL

YYIvrot.png

Link to comment
Share on other sites

(insert name here)

Hmm, what happens if you exceed that limit? Does the game crash or will cars simply not follow the paths on the new pieces of road? I had just planned on adding the road bits to "comNtop.ipl". Will that not work? I did add a single road piece to one of the Shoreside Vale ipls and it seemed to work fine (though I didn't poke around to see if other paths had then been disabled). That was also only a single road segment rather than the many that I'd add beneath the stadium, so maybe I just hadn't exceeded the limit yet? What happens if I create the road segments as objects when starting the Bloodring-esque side mission? Would the paths even be created with the road model in that case?

Link to comment
Share on other sites

It didn't crash cus we can add 2 roads I think (crashes if more), I tried adding models by scm, but it simply doesn't work.

YYIvrot.png

Link to comment
Share on other sites

(insert name here)

Shucks, is there a way I can edit the stadium model so that it has vehicle paths attached to it? Then I'd only be adding one more model that has paths, so I'd still be within the limits.

Edited by (insert name here)
Link to comment
Share on other sites

It is possible, but you can add only 5 new lines, dunno if it's enough...

YYIvrot.png

Link to comment
Share on other sites

(insert name here)

That's not as many as I'd like, but it's certainly better than nothing. Since I can add two models with paths without the game crashing, that means I should be able to add ten paths within the stadium by breaking the stadium model into two models. How exactly do I attach new paths to a model? Does each path allow two-way traffic flow, or does each path only allow cars to drive in a single direction (because I'm pretty sure even when set to ignore all traffic laws, cars will still always drive the correct way on a street)? Can a single path curve, or does it have to be a straight line between two points?

Link to comment
Share on other sites

No, you're wrong, you still can add only 5 lines, unless you edit original object. ;)

I tried some time ago to add new paths and it didn't work. I'm not sure but I think they're similar to VC ones.

They can't curve, every line has it's own straight line, there's 12 lines limit for each object but you can add only 5, because of another limit (ARGHH).

YYIvrot.png

Link to comment
Share on other sites

(insert name here)

Dang, I guess I'll have to settle for only 5 path lines. Better than nothing, I guess. I found this thread about how to add paths, so I'll give it a shot when I have time in the few days and see if I can manage to make it work.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 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.