IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (4) [1] 2 3 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [Q] Make the npcs stop behind my car

 
Rob.Zombie  
Posted: Monday, Feb 23 2009, 19:55
Quote Post


Sgt.Kanyo
Group Icon
Group: Members
Joined: Mar 22, 2007

hg.gif

XXXXX



Is there a way to make npcs stop behind my car? When I stop at a red light they all think there's no driver in my car and they try to overtake me. I've found out that I have to move forward a bit (even a press on the forward key button will do) and then their timer starts again. They wait for about 3 seconds then they try to overtake. A simple mod would do when you stop your car, niko would automatically hit the break pedals and npcs wouldn't overtake you. Yeah yeah I know, wtf you stop at red lights? Well yeah sometimes when I'm roleplaying in a taxi cab or whatever I'd like biggrin.gif
PM
  Top
 

 
algrn912005  
Posted: Monday, Feb 23 2009, 22:32
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jan 19, 2009

XXXXX



It's ok to stop at red light lol, that's why they were made. I like to stop once in a while and be a "good" person. I would also like this mod...
PM
  Top
 

 
a-k-t-w  
Posted: Monday, Feb 23 2009, 23:30
Quote Post


Wannabe GTA IV Dev
Group Icon
Group: Members
Joined: Sep 30, 2008

au.gif

XXXXX



I think the stupidity of the peds is hilarious! lol.gif
PMXbox Live
  Top
 

 
dukee152  
Posted: Tuesday, Feb 24 2009, 01:30
Quote Post


Thug
Group Icon
Group: Members
Joined: Feb 19, 2009

XXXXX



ya well i like to keep my cars clean and i love the stupidity of the peds so we will have to fix that bug but make them stupider at another task
PMXbox Live
  Top
 

 
AngryAmoeba  
Posted: Tuesday, Feb 24 2009, 02:27
Quote Post


Symbiont
Group Icon
Group: Members
Joined: Jan 12, 2009

us.gif

XXXXX



I notice this all the time too. A fix would be awesome. And yeah sometimes I like to just cruise around without driving on the sidewalks and running red lights, especially when someone else is in the car and there's some dialogue going.
PM
  Top
 

 
warclaw  
Posted: Tuesday, Feb 24 2009, 11:25
Quote Post


Prankster
Group Icon
Group: BUSTED!
Joined: Jan 19, 2008

XXXXX



i hope that too its not feel real please ALEX or other make that mod that fix that!
PM
  Top
 

 
Andrew  
Posted: Tuesday, Feb 24 2009, 12:01
Quote Post



Group Icon
Group: Forum Admins
Joined: Jul 21, 2003

Member Award




You could using the .net script hook. Write a script that, gets the NPC behind your car (a certain distance and only facing a certain heading and your speed = 0). And freeze the position of that car, until you start to move away.
PM
  Top
 

 
Hergonan  
Posted: Tuesday, Feb 24 2009, 12:25
Quote Post


Prankster
Group Icon
Group: Members
Joined: Aug 31, 2005

cy.gif

XXXXX



You can get the vehicle behind you by using getrandomvehicle behind you (and using your car's angles to define "behind") etc
hmmm
I can take a look at it.
After I finish my two projects sad.gif
Users WebsitePMMSN
  Top
 

 
Rob.Zombie  
Posted: Tuesday, Feb 24 2009, 15:55
Quote Post


Sgt.Kanyo
Group Icon
Group: Members
Joined: Mar 22, 2007

hg.gif

XXXXX



That'd be so great. I would help you out but I don't know anything about scripting (no lua script, no .net scripts no nothing) confused.gif
Or maybe if some1 could just actually make Niko use the break when the vehicle is stopped. I think this might stop the vehicles behind us since every npc hits the break when it is stopped (you can see it by the red light)
PM
  Top
 

 
Andrew  
Posted: Tuesday, Feb 24 2009, 20:04
Quote Post



Group Icon
Group: Forum Admins
Joined: Jul 21, 2003

Member Award




QUOTE (Rob.Zombie @ Feb 24 2009, 16:55)
That'd be so great. I would help you out but I don't know anything about scripting (no lua script, no .net scripts no nothing) confused.gif
Or maybe if some1 could just actually make Niko use the break when the vehicle is stopped. I think this might stop the vehicles behind us since every npc hits the break when it is stopped (you can see it by the red light)

I don't think there is a brake. I've tried holding Accelerate and Reverse down at the same time and its not worked.
PM
  Top
 

 
Tuhnafisch  
Posted: Tuesday, Feb 24 2009, 20:15
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Feb 16, 2009

gr.gif

XXXXX



i`m also very interisted(?) in this mOd i like to play as a "good" i would say normal civilian from LC alien.gif
PMMSN
  Top
 

 
dukee152  
Posted: Tuesday, Feb 24 2009, 20:21
Quote Post


Thug
Group Icon
Group: Members
Joined: Feb 19, 2009

XXXXX



also somtimes when i park the people dont go around me they just stop the car and honk
PMXbox Live
  Top
 

 
Rob.Zombie  
Posted: Tuesday, Feb 24 2009, 20:26
Quote Post


Sgt.Kanyo
Group Icon
Group: Members
Joined: Mar 22, 2007

hg.gif

XXXXX



Really? Maybe the worst thing is that when they try to overtake me, but they fail. Like hitting my car. I'm so pissed that sometimes I get out of my car and shoot the bitch in the head. And it'd be great if some1 could make the npcs drive a little better. Like the light is red and npc is approaching the light with 80 Km/s and trys to stop in the last second, so npc can't stop and passes the red light. This always occur at Star Junction for me. If we could only change their reaction time (or I dunno what)
PM
  Top
 

 
Shof  
Posted: Tuesday, Feb 24 2009, 21:35
Quote Post


Thug
Group Icon
Group: Members
Joined: Dec 23, 2005

XXXXX



i had at various time, another car rear end my car when i stopped at a red light. Then that driver will drag niko out of my car to start a fight as if i caused the accident
PMXbox Live
  Top
 

 
Andrew  
Posted: Tuesday, Feb 24 2009, 22:17
Quote Post



Group Icon
Group: Forum Admins
Joined: Jul 21, 2003

Member Award




Alright give this a try -> http://www.gtagarage.com/mods/show.php?id=5601

It uses the .net script hook 0.86. Just put the file into the scripts folder. Hopefully it will stop the peds from running into the back of you, they'll still get pissed off at waiting and attempt to either run into or or drive past you, this just sets the peds speed to 0 when it detects them trying that.

At the moment if you get close enough to a car while driving, they'll stop too. Only at the side of you though.
PM
  Top
 

 
Hergonan  
Posted: Tuesday, Feb 24 2009, 22:43
Quote Post


Prankster
Group Icon
Group: Members
Joined: Aug 31, 2005

cy.gif

XXXXX



QUOTE (Gangsta Killa @ Feb 24 2009, 22:17)
Alright give this a try -> http://www.gtagarage.com/mods/show.php?id=5601

It uses the .net script hook 0.86. Just put the file into the scripts folder. Hopefully it will stop the peds from running into the back of you, they'll still get pissed off at waiting and attempt to either run into or or drive past you, this just sets the peds speed to 0 when it detects them trying that.

At the moment if you get close enough to a car while driving, they'll stop too. Only at the side of you though.

Gangsta are you using getclosestcar with your own xyz?
Users WebsitePMMSN
  Top
 

 
Andrew  
Posted: Tuesday, Feb 24 2009, 22:46
Quote Post



Group Icon
Group: Forum Admins
Joined: Jul 21, 2003

Member Award




I'm using the GetClosestCar with the players position and a radius of about 6. function of the scripthook. Sadly this will even return closest cars to the side of you as well. Providing they are in the same heading as you. I'm going to change it to only come into effect when you're speed is slow.
PM
  Top
 

 
Hergonan  
Posted: Tuesday, Feb 24 2009, 22:48
Quote Post


Prankster
Group Icon
Group: Members
Joined: Aug 31, 2005

cy.gif

XXXXX



Why not get your car rotation, flip its axes to get your behind, then use a smaller radius to get npcs only behind you?
Users WebsitePMMSN
  Top
 

 
Andrew  
Posted: Tuesday, Feb 24 2009, 22:53
Quote Post



Group Icon
Group: Forum Admins
Joined: Jul 21, 2003

Member Award




Hmm that could work better.
PM
  Top
 

 
HazardX  
Posted: Tuesday, Feb 24 2009, 23:38
Quote Post


pedestrian mangler
Group Icon
Group: Members
Joined: Dec 13, 2008

gr.gif

XXXXX



I tried it that way. Seems to work great:
CODE
Imports System
Imports System.Windows.Forms
Imports System.Collections.Generic
Imports Microsoft.VisualBasic
Imports GTA

Public Class HaltBehindScript
  Inherits Script

  Private list As New List(Of Vehicle)
  Private bStopped As Boolean = False
  Private offset As New Vector3(0.0F, -4.0F, 0.0F)

  Public Sub New()
     'Interval = 250
  End Sub

  Private Sub HaltBehindScript_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Tick
     Dim v As Vehicle = Player.Character.CurrentVehicle
     If v Is Nothing Then
        If bStopped Then Disable()
        Return
     End If
     If Not bStopped Then
        If v.Speed >= 1.0F Then Return
        bStopped = True
     Else
        If v.Speed >= 2.0F Then
           Disable
           Return
        End If
     End If

     CheckForNewCar(v.GetOffsetPosition(offset))
     ProcessCars()
  End Sub

  Private Sub Disable()
     bStopped = False
     list.Clear()
  End Sub

  Private Sub CheckForNewCar(ByVal Position As Vector3)
     Dim v As Vehicle = World.GetClosestVehicle(Position, 3.0F)
     If v Is Nothing OrElse list.Contains(v) Then Return
     list.Add(v)
     v.SetMetadata("maxspeed", False, v.Speed)
  End Sub

  Private Sub ProcessCars()
     Dim CurrentSpeed As Single
     Dim MaxSpeed As Single
     For Each v As Vehicle In list
        CurrentSpeed = v.Speed
        MaxSpeed = v.GetMetadata(Of Single)("maxspeed", False)
        If CurrentSpeed < MaxSpeed Then
           v.SetMetadata("maxspeed", False, CurrentSpeed)
        ElseIf CurrentSpeed > MaxSpeed Then
           v.Speed = MaxSpeed
        End If
     Next
  End Sub

End Class

It checks only behind the car and also will not lower vehicle speeds, but instead just don't allow them to accelerate again.

This post has been edited by HazardX on Wednesday, Feb 25 2009, 08:36
Users WebsitePM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (4) [1] 2 3 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG