Virtual Pancake Posted February 9, 2012 Share Posted February 9, 2012 (edited) Upon beating this game quite a few years ago, I have always wanted to be able to drive a vehicle with the same ability this truck has. I was able to stop the truck by mass spawning Hydras and highjacking it myself because if you let Cesar highjack it, the ability goes away. Now for the real challenge. Is it possible to turn this into a CLEO mod? http://www.youtube.com/watch?feature=playe...N8U1fFWc#t=204s Here is a video I made myself showing what the truck actually does. NOTE: This is not a weight issue as the vehicle that gets thrown to the side never actually touches the truck. It is almost as if there is a force field attached to the truck front end. I managed to find the block of code for that specific mission but I am not exactly sure how to identify which is which. Any help is appreciated! Edited February 10, 2012 by Virtual Pancake Link to comment Share on other sites More sharing options...
Deji Posted February 9, 2012 Share Posted February 9, 2012 It wouldn't look quite so impressive if CJ did it. I mean.. who's gonna steer the bike? Link to comment Share on other sites More sharing options...
Virtual Pancake Posted February 9, 2012 Author Share Posted February 9, 2012 It wouldn't look quite so impressive if CJ did it. I mean.. who's gonna steer the bike? I am just interested in having the ability that the truck has. The mission in general wasn't all that entertaining but driving something with the ability that truck has is. Link to comment Share on other sites More sharing options...
Deji Posted February 9, 2012 Share Posted February 9, 2012 What's special about it? I recall nothing special about the truck itself. Link to comment Share on other sites More sharing options...
fireguy109 Posted February 10, 2012 Share Posted February 10, 2012 You mean the ability to ram the sh*t out of anything in your path? Link to comment Share on other sites More sharing options...
Virtual Pancake Posted February 10, 2012 Author Share Posted February 10, 2012 Here you guys go. Took awhile to get everything set up and working but this is a perfect example of what the truck actually does. And it isn't a weight issue. The car gets thrown before it even makes contact with the truck. Link to comment Share on other sites More sharing options...
Virtual Pancake Posted February 10, 2012 Author Share Posted February 10, 2012 (edited) ::REMOVED:: That is the actual mission that the truck is in. The truck seems to be identified as "[email protected]" Edited February 10, 2012 by Virtual Pancake Link to comment Share on other sites More sharing options...
Frank.s Posted February 10, 2012 Share Posted February 10, 2012 It looks like it's either Car.ImmuneToNonPlayer([email protected]) = True Or 0714: unknown_car [email protected] flag 1 Or both. Haven't tested those in-game though. Link to comment Share on other sites More sharing options...
Virtual Pancake Posted February 10, 2012 Author Share Posted February 10, 2012 It looks like it's either Car.ImmuneToNonPlayer([email protected]) = True Or 0714: unknown_car [email protected] flag 1 Or both. Haven't tested those in-game though. I was thinking it was "0714: unknown_car [email protected] flag 1" as well but again, I have no way of testing that. Link to comment Share on other sites More sharing options...
Frank.s Posted February 10, 2012 Share Posted February 10, 2012 (edited) Ah, i thought you could script it your self. I'll make a cleo script that activates that mode when the player is in a car and presses 1 + 0 at the same time. Will post here when done. Edit: While scripting that i found that it's not those two opcodes that makes vehicles fly in different direcions when they get hit. It's actually a looping code that finds any vehicles that are near the front of the truck and makes them fly in that direction using additional scripting. I'm gonna write a code that uses the method found in the HighJack mission. Edit2: Done. Download Link CLEO source code also written below. Some slight bugs like: cars bounce a little too far away when going at high speed (you'll see ) + the coordinates are made for the juggernaught so hit cars will bounce away before reaching the front end of smaller vehicles + it's only a copypaste with variables changed to work with cleo + not enough checks so it will probably cause a crash if you try to use it in odd scripted situations. // Super Vehicle Script// Made from code copypasted from HighJack mission// By Frank.s{$CLEO .cs}:FSupVeh03A4: name_thread "FSupVeh"0001: wait 500 ms:FSupVeh_10001: wait 0 ms00D6: if0256: player $PLAYER_CHAR defined004D: jump_if_false @FSupVeh_100D6: if and0AB0: key_pressed 480AB0: key_pressed 49004D: jump_if_false @FSupVeh_100D6: if00DF: actor $PLAYER_ACTOR driving004D: jump_if_false @FSupVeh_103C0: [email protected] = actor $PLAYER_ACTOR car01EC: make_car [email protected] very_heavy 102AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 103E5: show_text_box 'FEM_OK'018C: play_sound 1052 at 0.0 0.0 0.0:TORENO2_12228ifnot Car.Wrecked([email protected])jf @TORENO2_129310407: store_coords_to [email protected] [email protected] $TEMPVAR_FLOAT_3 from_car [email protected] with_offset -3.0 2.0 0.00407: store_coords_to [email protected] [email protected] $TEMPVAR_FLOAT_3 from_car [email protected] with_offset 3.0 11.0 0.0053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] Car.Wrecked([email protected])jf @TORENO2_1293102E3: [email protected] = car [email protected] [email protected] *= 0.0202F8: get_car [email protected] Z_angle_cosine_to [email protected]: get_car [email protected] Z_angle_sine_to [email protected]: [email protected] = [email protected] // (float)[email protected] = -1.0006B: [email protected] *= [email protected] // (float)Car.StorePos([email protected], [email protected], [email protected], [email protected])Car.StorePos([email protected], [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)005B: [email protected] += [email protected] // (float)if2.5 > [email protected] @[email protected] > -2.5jf @[email protected] > 0.0jf @[email protected] = 1.0jump @TORENO2_12625:[email protected] = -1.0:TORENO2_126250087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= 0.50087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)005B: [email protected] += [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= 0.50087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)005B: [email protected] += [email protected] // (float)0087: [email protected] = [email protected] // (float)[email protected] += [email protected] *= [email protected] = -1.0006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] = -1.0006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] = 0.003CF: load_wav 19400 as 3:SetupTheSound_10001: wait 0 msif03D0: wav 3 loadedjf @SetupTheSound_103D1: play_wav 303A2: set_car [email protected] action 307D5: set_car [email protected] velocity_in_direction_XYZ [email protected] [email protected] [email protected] rotation_velocitiesXY [email protected] [email protected] unk [email protected]([email protected]) = 499:TORENO2_12921054F: clear_car [email protected] damageCar.RemoveReferences([email protected]):TORENO2_129310001: wait 0 ms00D6: if00DB: actor $PLAYER_ACTOR in_car [email protected]: jump_if_false @EndItAll0002: jump @TORENO2_12228:EndItAll0001: wait 0 msif03D0: wav 3 loadedjf @FSupVeh_1040D: unload_wav 30002: jump @FSupVeh_1 Uhh.. I think most of us already have the main.scm, we don't need you to post the huge amount of code which makes browsing the topic difficult.+1, however it did help me do the cleo script without needing to look at the main.And yeah, it's not really a special ability. It's more like a crappy technique used by R* to cover up how bad it looks when cars on recorded paths crash "through" other cars/entities.Ah, i never considered that, makes sense. One of the mod ideas I had was to have cars be blown away in a similar way when the horn key is pressed ("SuperHorn" ). But it's low-priority for me at the moment.Nice.Stuff like this makes me wish i knew how to use sine and cosine. Edited February 10, 2012 by Frank.s Link to comment Share on other sites More sharing options...
Deji Posted February 10, 2012 Share Posted February 10, 2012 Uhh.. I think most of us already have the main.scm, we don't need you to post the huge amount of code which makes browsing the topic difficult. And yeah, it's not really a special ability. It's more like a crappy technique used by R* to cover up how bad it looks when cars on recorded paths crash "through" other cars/entities. One of the mod ideas I had was to have cars be blown away in a similar way when the horn key is pressed ("SuperHorn" ). But it's low-priority for me at the moment. Link to comment Share on other sites More sharing options...
Virtual Pancake Posted February 10, 2012 Author Share Posted February 10, 2012 Ah, i thought you could script it your self. I'll make a cleo script that activates that mode when the player is in a car and presses 1 + 0 at the same time. Will post here when done. Edit: While scripting that i found that it's not those two opcodes that makes vehicles fly in different direcions when they get hit. It's actually a looping code that finds any vehicles that are near the front of the truck and makes them fly in that direction using additional scripting. I'm gonna write a code that uses the method found in the HighJack mission. Edit2: Done. Download Link CLEO source code also written below. Some slight bugs like: cars bounce a little too far away when going at high speed (you'll see ) + the coordinates are made for the juggernaught so hit cars will bounce away before reaching the front end of smaller vehicles + it's only a copypaste with variables changed to work with cleo + not enough checks so it will probably cause a crash if you try to use it in odd scripted situations. // Super Vehicle Script// Made from code copypasted from HighJack mission// By Frank.s{$CLEO .cs}:FSupVeh03A4: name_thread "FSupVeh"0001: wait 500 ms:FSupVeh_10001: wait 0 ms00D6: if0256: player $PLAYER_CHAR defined004D: jump_if_false @FSupVeh_100D6: if and0AB0: key_pressed 480AB0: key_pressed 49004D: jump_if_false @FSupVeh_100D6: if00DF: actor $PLAYER_ACTOR driving004D: jump_if_false @FSupVeh_103C0: [email protected] = actor $PLAYER_ACTOR car01EC: make_car [email protected] very_heavy 102AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 103E5: show_text_box 'FEM_OK'018C: play_sound 1052 at 0.0 0.0 0.0:TORENO2_12228ifnot Car.Wrecked([email protected])jf @TORENO2_129310407: store_coords_to [email protected] [email protected] $TEMPVAR_FLOAT_3 from_car [email protected] with_offset -3.0 2.0 0.00407: store_coords_to [email protected] [email protected] $TEMPVAR_FLOAT_3 from_car [email protected] with_offset 3.0 11.0 0.0053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] Car.Wrecked([email protected])jf @TORENO2_1293102E3: [email protected] = car [email protected] [email protected] *= 0.0202F8: get_car [email protected] Z_angle_cosine_to [email protected]: get_car [email protected] Z_angle_sine_to [email protected]: [email protected] = [email protected] // (float)[email protected] = -1.0006B: [email protected] *= [email protected] // (float)Car.StorePos([email protected], [email protected], [email protected], [email protected])Car.StorePos([email protected], [email protected], [email protected], [email protected])0063: [email protected] -= [email protected] // (float)0063: [email protected] -= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)005B: [email protected] += [email protected] // (float)if2.5 > [email protected] @[email protected] > -2.5jf @[email protected] > 0.0jf @[email protected] = 1.0jump @TORENO2_12625:[email protected] = -1.0:TORENO2_126250087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= 0.50087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)005B: [email protected] += [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] *= 0.50087: [email protected] = [email protected] // (float)006B: [email protected] *= [email protected] // (float)0087: [email protected] = [email protected] // (float)005B: [email protected] += [email protected] // (float)0087: [email protected] = [email protected] // (float)[email protected] += [email protected] *= [email protected] = -1.0006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] = -1.0006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)006B: [email protected] *= [email protected] // (float)[email protected] = 0.003CF: load_wav 19400 as 3:SetupTheSound_10001: wait 0 msif03D0: wav 3 loadedjf @SetupTheSound_103D1: play_wav 303A2: set_car [email protected] action 307D5: set_car [email protected] velocity_in_direction_XYZ [email protected] [email protected] [email protected] rotation_velocitiesXY [email protected] [email protected] unk [email protected]([email protected]) = 499:TORENO2_12921054F: clear_car [email protected] damageCar.RemoveReferences([email protected]):TORENO2_129310001: wait 0 ms00D6: if00DB: actor $PLAYER_ACTOR in_car [email protected]: jump_if_false @EndItAll0002: jump @TORENO2_12228:EndItAll0001: wait 0 msif03D0: wav 3 loadedjf @FSupVeh_1040D: unload_wav 30002: jump @FSupVeh_1 Uhh.. I think most of us already have the main.scm, we don't need you to post the huge amount of code which makes browsing the topic difficult. +1, however it did help me do the cleo script without needing to look at the main.And yeah, it's not really a special ability. It's more like a crappy technique used by R* to cover up how bad it looks when cars on recorded paths crash "through" other cars/entities.Ah, i never considered that, makes sense. One of the mod ideas I had was to have cars be blown away in a similar way when the horn key is pressed ("SuperHorn" ). But it's low-priority for me at the moment.Nice.Stuff like this makes me wish i knew how to use sine and cosine. I am learning to script actually but thanks for whipping a quick one up! Going to try it out now. 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