Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Irsis

(SA) How to create LOD for moving object?

Recommended Posts

Irsis

How to create LOD for moving object spawned by cleo script? I tried 0827: assign LOD, but when i delete that object and save my game, it wont load later(crash).

If i cant create it, how to increase specific object's draw distance by script? I tried editing object's ide draw distance by increasing it to 3000, but still dissapear when i far from it.

Thank you

Share this post


Link to post
Share on other sites
ZAZ

LOD object aren't suitable for using in scripts because the most of it have NO collisions model

LOD object are working by a special method, always by ipl in connection with their base model

Only some rarely objects have a coll model

 

Increasing draw distance of normal objects is possible, but it don't work if is connected with a LOD model

and needs to be testet if it works stable, simple objects have better chance than complex models

also 3000 units is too much maybe, try 900

 

I tried to increase the draw distance of the laeskatetube at LA skatepark to 900

this object don't have any LOD connection

5400, laeskatetube1, glenpark7_lae, 140, 128
5400, laeskatetube1, glenpark7_lae, 900, 128

but it didn't work

but i know that it is possible because i already installed custom models with range of 900

 

I made a test with the healthy heart object
1240, health, icons5, 100, 128
increased the draw distance

1240, health, icons5, 900, 128

and placed it at St.Maria beach

1240, health, 0, 225.539, -1875, 4.1, 0, 0, 0, 1, -1

I could see the heart from the bridge at Santa Monica Pier Arch: 359.6292 -1661.0527 32.8629

 

 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
Irsis

I set it to 900 but it still dissapear in short radius.

So i cant create LOD outside ipl? Then how to make it work for moving object? What about 0827: assign object to LOD? Do you know the correct way to use it ? i can see my object(Blimp Airship) from thousands radius using this opcode. What make my game crash after i load it? I believe i delete it(object.destroy) properly before saving the game. Maybe is there any opcode to un-assign 0827: ?

Edited by Irsis

Share this post


Link to post
Share on other sites
ZAZ

that's the method to place LOD by script

main.scm

029B: $2723 = init_object #TWRCRANE_M_01 at -2080.441 256.007 99.408 
01C7: remove_object_from_mission_cleanup_list $2723
01BB: store_object $2723 position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 
0176: $TEMPVAR_ANGLE = object $2723 Z_angle 
029B: $2726 = init_object #LODCRANE_M_01 at $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 
0177: set_object $2726 Z_angle_to $TEMPVAR_ANGLE 
0827: assign_object $2723 to_lod_object $2726

it works in this case because LODCRANE_M_01 have a own collisions model

 

 

 

 

Quote

i can see my object(Blimp Airship) from thousands radius using this opcode. What make my game crash after i load it?

what's the usage? can you see it or does it crash?

did you increase the distance of the Blimp object

or did you assigne a LODblimp? by ipl or by script?

in case of a LODBlimp, does this LODobject have a collisions model?

 

 

 

Share this post


Link to post
Share on other sites
Irsis

I can see it from far away, and it didnt crash. The only crash is when i save my game, quit then load save file, after loading the crash occur.

I didn increase and didnt assign it by IPL. I only use 1 model for Blimp and and Lod(is this okay?)

I assign it by script(0827:)

The blimp lod have collsion, because its the same model/ID as main object.

 

By the way, here's some part of the script:

Model.load (3151)

If

Model.available (3151)

Jf @create

Object.create ([email protected], 3151, [email protected], [email protected], [email protected])

Object.angle([email protected]) = [email protected]

Object.create([email protected], 3151, 0.0, 0.0, 0.0)

Object.angle([email protected]) = [email protected]

0392: make_object [email protected] moveable 1

0382: set_object [email protected] collision_detection 1

0827: assign_object [email protected] to_lod_object [email protected]

069A: attach_object [email protected] to_object [email protected] with offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0

Model.destroy(3151)

 

Share this post


Link to post
Share on other sites
ZAZ

remove 069A !

 

not a good idea to give these gives options to the LOD model:

0392: make_object [email protected] moveable 1

0382: set_object [email protected] collision_detection 1

 

give it to the base model makes more sense

0392: make_object [email protected] moveable 1

0382: set_object [email protected] collision_detection 1

 

ähh, wait, you're using same id for both object and assigne one of it as LOD?

that's nonsense

 

Quote

The only crash is when i save my game, quit then load save file, after loading the crash occur.

and it works without these objects?

 

does it work if you only place one object by simple spawnment?

 Model.load (3151)
If
Model.available (3151)
Jf @create
Object.create (31@, 3151, 0@, 1@, 2@)
Object.angle(31@) = 3@ 

 

Share this post


Link to post
Share on other sites
Irsis
Quote

remove 069A !

not a good idea to give these gives options to the LOD model:
0392: make_object [email protected] moveable 1
0382: set_object [email protected] collision_detection 1

 

I removed it, still the same.

Actually, the base object(the one which have scripted moves) is [email protected]

Quote

ähh, wait, you're using same id for both object and assigne one of it as LOD?

that's nonsense

 

Do i have to create another ide like LOD_Blimp? I just took the model from other author's mod and Unfortunately he doesnt have lod version of his blimp.

Quote

and it works without these objects?

does it work if you only place one object by simple spawnment?

 

It works when i removes object.destroy [email protected] and [email protected] from the script OR Object.destroys stay, but i have to remove 0827: from script. I have to delete these objects on certain circumstances like onmission, in interior, in county etc. I dont want these objects piling up my save file.

It works with simple spawnment but with limited draw distance.

 

 

Edited by Irsis

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

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