Welcome to Open Carnage

A resource for modders and technology enthusiasts; have a wander to see why we're worth the time! EST. 2012

Sign in to follow this  
Followers 0
aLTis

Vehicle's weapon object

Is there a way to get weapon object ID of a specific vehicle? Using that I could sync vehicle health meters for vehicles like Falcon.

 

I'm dumb. I got it: weapon = read_dword(vehicle_object + 0x2F8)

WaeV and NeX like this

08f9474ede.jpg

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Wait, I already have 0x2F8 in my plugins but it's for max_forward_velocity, and its supposed to be a float!

 

tag_types['vehi'] = define_halo_struct(struct_size=0x3F0,
    model=halofield.TagReference(offset=0x28),
    animation=halofield.TagReference(offset=0x38),
    collision=halofield.TagReference(offset=0x70),
    physics=halofield.TagReference(offset=0x80),
    max_forward_velocity=field.Float32(offset=0x2F8),
    max_reverse_velocity=field.Float32(offset=0x2FC),
    acceleration=field.Float32(offset=0x300),
    deceleration=field.Float32(offset=0x304),
    suspension_sound=halofield.TagReference(offset=0x3B0),
    crash_sound=halofield.TagReference(offset=0x3C0))

Share this post


Link to post
Share on other sites

Wait, I already have 0x2F8 in my plugins but it's for max_forward_velocity, and its supposed to be a float!

 

tag_types['vehi'] = define_halo_struct(struct_size=0x3F0,
    model=halofield.TagReference(offset=0x28),
    animation=halofield.TagReference(offset=0x38),
    collision=halofield.TagReference(offset=0x70),
    physics=halofield.TagReference(offset=0x80),
    max_forward_velocity=field.Float32(offset=0x2F8),
    max_reverse_velocity=field.Float32(offset=0x2FC),
    acceleration=field.Float32(offset=0x300),
    deceleration=field.Float32(offset=0x304),
    suspension_sound=halofield.TagReference(offset=0x3B0),
    crash_sound=halofield.TagReference(offset=0x3C0))

I think you're joking, but I'm not sure. He is reading object data while you are reading tag data.

WaeV likes this

dynamic.png

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  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.