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

Happy Holidays from the GTANet team!

GLASS


milkjunk87
 Share

Recommended Posts

hey guys how do i spawn a prop of glass than can be destroyed like at bus stops and windshields? i have tried the following:

prop_sglasss_1b_lod, prop_showroom_glass_1b, prop_fib_broken_window. All of these are indestructible and do not fall apart upon being shot. Thanks

 

  • Like 1
Link to comment
Share on other sites

f*ck it who wants to help me make a building out of props that is frozen entity until damaged then collapses?

Link to comment
Share on other sites

hey guys how do i spawn a prop of glass than can be destroyed like at bus stops and windshields? i have tried the following:

prop_sglasss_1b_lod, prop_showroom_glass_1b, prop_fib_broken_window. All of these are indestructible and do not fall apart upon being shot. Thanks

 

 

The glass you can find at the bus stop seems to be a part of the bus stop itself. There is no possible way to get the glass ID for example.

However, I've noticed there was a native for Windshields :

static void _DETACH_VEHICLE_WINDSCREEN(Vehicle vehicle)

You can use it with :

        public void OnKeyDown(object sender, KeyEventArgs e)        {            if(e.KeyCode == Keys.B)            {                Vehicle currentCar = player.CurrentVehicle;                Function.Call(Hash._DETACH_VEHICLE_WINDSCREEN, currentCar);                UI.ShowSubtitle("Detached");            }                   }

And it will return :

 

dFUVuPP.jpg

 

IWFV6U5.jpg

 

Hope it helps.

Edited by ins1de
  • Like 1
Link to comment
Share on other sites

awesome sauce

 

 

hey guys how do i spawn a prop of glass than can be destroyed like at bus stops and windshields? i have tried the following:

prop_sglasss_1b_lod, prop_showroom_glass_1b, prop_fib_broken_window. All of these are indestructible and do not fall apart upon being shot. Thanks

 

 

The glass you can find at the bus stop seems to be a part of the bus stop itself. There is no possible way to get the glass ID for example.

However, I've noticed there was a native for Windshields :

static void _DETACH_VEHICLE_WINDSCREEN(Vehicle vehicle)

You can use it with :

        public void OnKeyDown(object sender, KeyEventArgs e)        {            if(e.KeyCode == Keys.B)            {                Vehicle currentCar = player.CurrentVehicle;                Function.Call(Hash._DETACH_VEHICLE_WINDSCREEN, currentCar);                UI.ShowSubtitle("Detached");            }                   }

And it will return :

 

dFUVuPP.jpg

 

IWFV6U5.jpg

 

Hope it helps.

 

awesome sauce ill give it a go

Link to comment
Share on other sites

mockba.the.borg

It looks to me that the physics on the glass (including the detached windshields) is not real. Only thing that is happening is a trick with textures and transparency maps.

The windshield in the picture, for example, when shot, doesn't shatter into a thousand pieces as a frame of glass would do. Its frame stays intact.

So, if it was supporting something, that thing would not fall when the glass is shot, as the frame would still hold it.

 

Does it have to be glass? What about bricks and barrels? we see those around the map, and as far as I remember, the bricks indeed shatter and disappear when shot. Not sure if barrels will explode though.

 

Cheers,

Mockba.

Link to comment
Share on other sites

It looks to me that the physics on the glass (including the detached windshields) is not real. Only thing that is happening is a trick with textures and transparency maps.

The windshield in the picture, for example, when shot, doesn't shatter into a thousand pieces as a frame of glass would do. Its frame stays intact.

So, if it was supporting something, that thing would not fall when the glass is shot, as the frame would still hold it.

 

Does it have to be glass? What about bricks and barrels? we see those around the map, and as far as I remember, the bricks indeed shatter and disappear when shot. Not sure if barrels will explode though.

 

Cheers,

Mockba.

Yea i dont know how to do this. heres what ive done

 if (e.KeyCode == Keys.E & modon)        {			//Prop glassyglass = World.CreateProp("prop_sglasss_1b_lod", Game.Player.Character.Position, true, false);            //Prop glassyglass2 = World.CreateProp("prop_sglasss_1b_lod", Game.Player.Character.Position+ new Vector3(0f, 0f, 0f), true, false);            //Prop glassyglass3 = World.CreateProp("prop_showroom_glass_1b", Game.Player.Character.Position + new Vector3(0f, 0f, 4f), true, false);			//Prop glassyglass3 = World.CreateProp("prop_fib_broken_window", Game.Player.Character.Position + new Vector3(0f, 0f, 4f), true, false);			//glassyglass.AddBlip();			//glassyglass2.AddBlip();			//glassyglass3.AddBlip();			/* for (int suicidepilotsindex = 0; suicidepilotsindex < 25; suicidepilotsindex++)			{				Prop glassyglass = World.CreateProp("prop_acc_guitar_01", Game.Player.Character.Position+ new Vector3(3f, 0f, 0f), true, false);				Prop glassyglass2 = World.CreateProp("prop_acc_guitar_01", Game.Player.Character.Position+ new Vector3(3.5f, 0f, 0f), true, false);			} */												for (int myindex3 = 1; myindex3 < 2; myindex3++)            {				                Random myrandom = new Random();                int randbottom = myrandom.Next(-5, 0);                int randright = myrandom.Next(-1, 5);                int randfront = myrandom.Next(-5, 5);                GTA.Math.Vector3 skydivepoint = Game.Player.Character.Position + Vector3.RelativeBottom * randbottom;                skydivepoint = skydivepoint + Vector3.RelativeFront * randfront;                skydivepoint = skydivepoint + Vector3.RelativeRight * randright;                //Vehicle biff = World.CreateVehicle(VehicleHash.Biff, skydivepoint);				skydivepoint=Game.Player.Character.Position+ 5*Game.Player.Character.ForwardVector;				Vehicle biff = World.CreateVehicle(VehicleHash.Biff, skydivepoint);				Function.Call(Hash._DETACH_VEHICLE_WINDSCREEN, biff);				trucks.Add(biff);				biff.AddBlip();				//GTA.Native.Function.Call(GTA.Native.Hash._0x9D77056A530643F6, time, 1);				//biff.Delete();			}}

Do you know how to

void FREEZE_ENTITY_POSITION(Entity entity, BOOL toggle) // 428CA6DBD1094446 65C16D57

get the windscreen entity?

Link to comment
Share on other sites

  • 11 months later...

Actually the glass physics is quite accurate it doesnt allow player to move through until after shot (see bus stations) then when you move through it shatters as you go threw. Anyone want to code it up?

Link to comment
Share on other sites

Actually the glass physics is quite accurate it doesnt allow player to move through until after shot (see bus stations) then when you move through it shatters as you go threw. Anyone want to code it up?

 

There's probably some glass object that does break on collision.

Have you tried more objects that the one if your code?

 

http://objects.codeshock.hu/gallery.php?page=5&perpage=12&search=glassthere has to be something

Link to comment
Share on other sites

  • 2 years later...

Any way I can get that script that shows every object ID and distance on screen, as shown displaying the windshield? Thanks!

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.