arielnmz Posted September 1, 2011 Share Posted September 1, 2011 The thing is, when I apply a car a velocity in direction, it doesnt always responds to the opcode, I mean, I use: 07D5: set_car [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.3 rotation_velocitiesXY 0.0 0.0 unk 0.0 but when it is on the way it doesnt seem to respond to the opcode, as if it were attached to the road... can you help me, people? Link to comment Share on other sites More sharing options...
BnB Posted September 1, 2011 Share Posted September 1, 2011 Can you post your whole script please? Link to comment Share on other sites More sharing options...
Silent Posted September 1, 2011 Share Posted September 1, 2011 Also, remember that vectors are relative to world directions, so you have to use the trygonometry to make them relative to car angle. Link to comment Share on other sites More sharing options...
ZAZ Posted September 1, 2011 Share Posted September 1, 2011 (edited) let 07D5: run in a loop Edited September 1, 2011 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Silent Posted September 1, 2011 Share Posted September 1, 2011 It's pretty risky, if values are high, though. Link to comment Share on other sites More sharing options...
arielnmz Posted September 1, 2011 Author Share Posted September 1, 2011 Ok... I know how to obtain a vector And it is actually inside of a loop... Code here: :AMINIG_194600D6: if 00E1: player 0 pressed_key 18 004D: jump_if_false @AMINIG_2247 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0 0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 100.0 find_next 0 pass_wrecked 0 //IF and SET 004D: jump_if_false @AMINIG_2247 :AMINIG_202600D6: if 803B: not [email protected] == [email protected] // (int) 004D: jump_if_false @AMINIG_2209 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0 0063: [email protected] -= [email protected] // (float) 0063: [email protected] -= [email protected] // (float) 0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected] 000F: [email protected] -= 90.0 02F6: [email protected] = sine [email protected] // (float) 02F7: [email protected] = cosine [email protected] // (float) 07D5: set_car [email protected] velocity_in_direction_XYZ [email protected] [email protected] 0.3 rotation_velocitiesXY 0.0 0.0 unk 0.0 :AMINIG_220900D6: if 8AE2: not [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 100.0 find_next 1 pass_wrecked 0 //IF and SET 004D: jump_if_false @AMINIG_2026 0001: wait 100 ms As you can see it apllies to all cars within 100.0 radius... but only a few cars respond to the "throw"... (I have confirmed that EVERY car is affected by the opcode, but only a few react to it, like I said before, as if they were attached to the ground), but if I collide with them, they surely will fly away... what happens here??? Link to comment Share on other sites More sharing options...
Silent Posted September 1, 2011 Share Posted September 1, 2011 Well, I think it's related to weird way how game processes traffic, ignoring gravity and some other things (probably to save CPU). I think it's possible to disable it via memory hacking, I don't know the addresses to nop though. You have to deal with it for now. Link to comment Share on other sites More sharing options...
ZAZ Posted September 1, 2011 Share Posted September 1, 2011 Ok... I know how to obtain a vector And it is actually inside of a loop... As you can see it apllies to all cars within 100.0 radius... but only a few cars respond to the "throw"... (I have confirmed that EVERY car is affected by the opcode, but only a few react to it, like I said before, as if they were attached to the ground), but if I collide with them, they surely will fly away... what happens here??? maybe the same car will be catched again add a if wrecked check and bind the random cars in array constructs CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
arielnmz Posted September 1, 2011 Author Share Posted September 1, 2011 I don't know what you mean with "catched again", and I don't know how to bind to array constructs (I think you mean those vars like [email protected]([email protected],12i)??) 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