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

    2. News

    1. Red Dead Redemption 2

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

      1. Gameplay
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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. Forum Support

    2. Site Suggestions

Sign in to follow this  
DaBOSS54320

[IV | SNT] Question about SNT objects...

Recommended Posts

DaBOSS54320

Edit: I figured it out now. Guess I posted this topic and gave up a lil too early... sorry bout that. Moderators can delete it if you want. But here's what I found out: offz is "obj.GetOffsetPosition(obj.Position).Z" with "obj" being your Object.

 

 

So I've been making my own object creator thing (It's like GTAO's a little bit, I'll probably make a topic on it later) and I want to make an option on it to save to objects.ini for use with Simple Native Trainer since far more people have that than my mod, and I don't want to force people to get my mod to load objects made with it. This is a fairly easy task for me to save the info to objects.ini except for 1 part... what is "offz" in SNT's objects.ini?

From "offz" I would think "offset z" but from what I tried, I don't think it's distance off the ground or z height from zero, and have no idea what else it could be.

 

I really didn't want to make a topic for this since it's just 1 little question but... couldn't figure it out after multiple attempts and asking some friends privately... thanks in advance if you know/answer.

 

To clarify, by offz I mean the "offz" in this (from my most recent saved objects.ini):

 

[1]
x=2336.58
y=785.368
z=7.50695
h=56.313
Model=96563979
qx=-0.0925108
qy=0.102251
qz=0.463401
qw=0.875355
offz=-656.655
Dynamic=0
Edited by DaBOSS54320

Share this post


Link to post
Share on other sites
byteMe420

this makes no sense...

 

obj.GetOffsetPosition(obj.Position).Z

 

u dont use the position in world coordinates to offset another world position, u create a vector3 and describe each vector's offset with x, y and z... so something like this is in front, above and to the left (1 distance unit in each direction)...

 

obj.GetOffsetPosition(new Vector3(-1f, 1f, 1f))

 

obj.GetOffsetPosition(obj.Position) this will just double the distance the object is from the world coordinates origin or 0, 0, 0. So basically u can just do.. obj.Position.Z * 2f if that is what u really want

Game.DisplayText(obj.GetOffsetPosition(obj.Position).Z == obj.Position.Z * 2f);//output: true

offsetz = -656.655 sounds like it is being offset from something in the clouds... appears odd but not sure how his script works or what he even means by offsetz

Edited by byteMe420

Share this post


Link to post
Share on other sites
Jitnaught

this makes no sense...

 

obj.GetOffsetPosition(obj.Position).Z

 

u dont use the position in world coordinates to offset another world position, u create a vector3 and describe each vector's offset with x, y and z... so something like this is in front, above and to the left (1 distance unit in each direction)...

 

obj.GetOffsetPosition(new Vector3(-1f, 1f, 1f))

 

obj.GetOffsetPosition(obj.Position) this will just double the distance the object is from the world coordinates origin or 0, 0, 0. So basically u can just do.. obj.Position.Z * 2f if that is what u really want

Game.DisplayText(obj.GetOffsetPosition(obj.Position).Z == obj.Position.Z * 2f);//output: true

offsetz = -656.655 sounds like it is being offset from something in the clouds... appears odd but not sure how his script works or what he even means by offsetz

Try rotating the object before getting the offset position and then check if it is the same as just doubling Z.

Share this post


Link to post
Share on other sites
byteMe420

 

this makes no sense...

 

obj.GetOffsetPosition(obj.Position).Z

 

u dont use the position in world coordinates to offset another world position, u create a vector3 and describe each vector's offset with x, y and z... so something like this is in front, above and to the left (1 distance unit in each direction)...

 

obj.GetOffsetPosition(new Vector3(-1f, 1f, 1f))

 

obj.GetOffsetPosition(obj.Position) this will just double the distance the object is from the world coordinates origin or 0, 0, 0. So basically u can just do.. obj.Position.Z * 2f if that is what u really want

Game.DisplayText(obj.GetOffsetPosition(obj.Position).Z == obj.Position.Z * 2f);//output: true if object rotation is zero, good point LetsPlayorDy

offsetz = -656.655 sounds like it is being offset from something in the clouds... appears odd but not sure how his script works or what he even means by offsetz

Try rotating the object before getting the offset position and then check if it is the same as just doubling Z.

 

 

yeah true i didnt think of that actually when i quickly wrote my post, if the object is rotated and oriented different than the world then yeah it would produce a differnt world coordinate z, good point.

 

Then if that is the case, it makes even less sense to offset using the world position value as the return value is random unless you are calling this kinda code knowing the rotation beforehand. Now if you are calling this on randomly rotated objects the Z value is random pretty much random unless maybe you want to detect if an object has fallen over because then the Z value wont change much from its current position z or maybe if it is upside down or rightside up, etc.. Although using the world position to accomplish that makes no sense. IMO, it sounds like a random number generator and .net has a random class for that.

 

Just trying to picture the logic, he wants to travel up the object's Z axis in the amount of the object's world position Z and get the world Z at that point? what is that for?

Edited by byteMe420

Share this post


Link to post
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
Sign in to follow this  

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.