nyolc8 Posted August 29, 2014 Share Posted August 29, 2014 Is it possible to make a vehicle component to move like towtruck's swinging rope bsed on the vehicle moving? I noticed that the rope component on towtruck is getting "skewed", not rotated. Any opcode recommendations? Or is it possible to just apply that "physics" to a component? Link to comment Share on other sites More sharing options...
Silent Posted September 1, 2014 Share Posted September 1, 2014 It's using the same code as bouncing damaged bumpers and yeah, setting component's frame to use bouncing panel logic via CLEO should be relatively straightforward. Link to comment Share on other sites More sharing options...
nyolc8 Posted September 1, 2014 Author Share Posted September 1, 2014 Thanks, I'll look into it. Link to comment Share on other sites More sharing options...
Silent Posted September 1, 2014 Share Posted September 1, 2014 I'll give you function addressess when I'm back home but can't post a full code for obvious reasons*. * HINT: Mobile phone + posting code = no Link to comment Share on other sites More sharing options...
nyolc8 Posted September 1, 2014 Author Share Posted September 1, 2014 Thank you, I really appreciate it! Link to comment Share on other sites More sharing options...
Silent Posted September 1, 2014 Share Posted September 1, 2014 OK, I found a good way to post more complex posts from a phone (I can use my PC keyboard with this phone! I love MyPhoneExplorer) so I can proviide a somewhat complete code: You haven't specified what car/dummy it should be so I made it into a SCM function - it takes 2 args, first is car handle and the second is dummy ID (in this case, misc_a is 20) :SET_BOUNCING_PANEL0A97: [email protected] = car [email protected] [email protected] += [email protected] = 00A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0if [email protected] == 0xFFFFthen 0AA6: call_method 0x6F4920 struct [email protected] num_params 3 pop 0 1.0 2 [email protected] 0AB2: ret [email protected] += 0x200A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0if [email protected] == 0xFFFFthen 0AA6: call_method 0x6F4920 struct [email protected] num_params 3 pop 0 1.0 2 [email protected] 0AB2: ret [email protected] += 0x200A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0if [email protected] == 0xFFFFthen 0AA6: call_method 0x6F4920 struct [email protected] num_params 3 pop 0 1.0 2 [email protected]: ret 0 Link to comment Share on other sites More sharing options...
nyolc8 Posted September 1, 2014 Author Share Posted September 1, 2014 Excellent! Thank you! I don't know how you guys figuring out these memory addresses, but thank god for you Btw I see those "0 1.0 2" sections... those are the X Y Z values for the swinging? Link to comment Share on other sites More sharing options...
nyolc8 Posted September 1, 2014 Author Share Posted September 1, 2014 (edited) I don't getting something... why we need to call that function 3 times? edit: also how to define custom dummy name? I used 0D0D from newopcodes to define custom dummy names, but as I see this 0AA6 only accepting structs. Any way to find the offset (like 20 for misc_a) for a defined component? edit: what is [email protected]? Why it's there? Also I see that 0 1.0 2 is not XYZ... So... 1.0 is a multiplier or somekind of that? Edited September 1, 2014 by nyolc8 jochuan 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now