Quantcast

Jump to content

» «
Photo

Make vehicles ignore paths when driving to a specified point

10 replies to this topic
(insert name here)
  • (insert name here)

    Player Hater

  • Members
  • Joined: 15 Jun 2014
  • United-States

#1

Posted 12 August 2014 - 04:29 PM

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.


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#2

Posted 13 August 2014 - 03:35 PM

vc and sa have codes to let the car ignore the paths but for III i didn't found any

(insert name here)
  • (insert name here)

    Player Hater

  • Members
  • Joined: 15 Jun 2014
  • United-States

#3

Posted 13 August 2014 - 07:21 PM

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.


AdusPL
  • AdusPL

    GTA III Dark Edition

  • Feroci
  • Joined: 06 Jun 2013
  • Poland

#4

Posted 13 August 2014 - 07:31 PM Edited by AdusPL, 13 August 2014 - 07:37 PM.

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:

(insert name here)
  • (insert name here)

    Player Hater

  • Members
  • Joined: 15 Jun 2014
  • United-States

#5

Posted 13 August 2014 - 07:54 PM

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?


AdusPL
  • AdusPL

    GTA III Dark Edition

  • Feroci
  • Joined: 06 Jun 2013
  • Poland

#6

Posted 13 August 2014 - 08:31 PM

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.

(insert name here)
  • (insert name here)

    Player Hater

  • Members
  • Joined: 15 Jun 2014
  • United-States

#7

Posted 14 August 2014 - 04:24 AM Edited by (insert name here), 14 August 2014 - 04:25 AM.

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.


AdusPL
  • AdusPL

    GTA III Dark Edition

  • Feroci
  • Joined: 06 Jun 2013
  • Poland

#8

Posted 14 August 2014 - 08:37 AM

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

(insert name here)
  • (insert name here)

    Player Hater

  • Members
  • Joined: 15 Jun 2014
  • United-States

#9

Posted 15 August 2014 - 04:25 PM

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?


AdusPL
  • AdusPL

    GTA III Dark Edition

  • Feroci
  • Joined: 06 Jun 2013
  • Poland

#10

Posted 15 August 2014 - 08:30 PM

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).

(insert name here)
  • (insert name here)

    Player Hater

  • Members
  • Joined: 15 Jun 2014
  • United-States

#11

Posted 16 August 2014 - 02:02 AM

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users