Arvin_S Posted June 13, 2005 Share Posted June 13, 2005 Help me plz. I want to make my car invulnerable ing SA so I copy the way used in VC. First put this line: 004F: create_thread ££LabelSuperCar Then: LabelSuperCar0001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false ££LabelSuperCar00D6: if 000E0: player $PLAYER_CHAR driving004D: jump_if_false ££LabelSuperCar03C1: $380 = player $PLAYER_CHAR car0224: set_car $380 health_to 5000053F: set_car $380 tires_vulnerable 002AC: set_car $380 immunities 1 1 1 1 10002: jump ££LabelSuperCar After compiling I put the new main.scm in data/script. But I when I start a new game,it crashed. Can any one tell me what's wrong? Link to comment Share on other sites More sharing options...
Opius Posted June 13, 2005 Share Posted June 13, 2005 There's a chance some of those opcodes don't work the same way they do in VC. Look for opcodes used in the SA SCM and use them instead of the VC ones. Link to comment Share on other sites More sharing options...
Arvin_S Posted June 13, 2005 Author Share Posted June 13, 2005 Yes,I just found out some opcode can't work in SA. Now how can I define the car I'm driving? Link to comment Share on other sites More sharing options...
Craig Kostelecky Posted June 13, 2005 Share Posted June 13, 2005 This opcode is the issue: 00E0: player $PLAYER_CHAR driving Replace it with this: 00DF: actor $PLAYER_ACTOR driving Also use this instead of the player_char code 03C0: $380 = actor $PLAYER_ACTOR car Link to comment Share on other sites More sharing options...
Arvin_S Posted June 13, 2005 Author Share Posted June 13, 2005 (edited) it works fine now.Thanks. Edited June 13, 2005 by Arvin_S Link to comment Share on other sites More sharing options...
Y_Less Posted June 13, 2005 Share Posted June 13, 2005 Also, as a general rule, you shouldn't use variables like $380 as they could be used elsewhere in the script, use something like $playercar which won't be used elsewhere (unless you put it there) due to the way the decompiler works. Link to comment Share on other sites More sharing options...
Arvin_S Posted June 13, 2005 Author Share Posted June 13, 2005 Also, as a general rule, you shouldn't use variables like $380 as they could be used elsewhere in the script, use something like $playercar which won't be used elsewhere (unless you put it there) due to the way the decompiler works. Thank you for your advice. Link to comment Share on other sites More sharing options...
Y_Less Posted June 13, 2005 Share Posted June 13, 2005 No prob. Link to comment Share on other sites More sharing options...
perkin Posted June 18, 2005 Share Posted June 18, 2005 (edited) Yo~ u know the last mission 2nd part the car "white convertable" you use to save Sweet is invernuble, so u can search for the orginal scm of SA for that part, and try to look for that line(s) u need. It might help to compare how they implement the procedures of each codes in SA by R* with self-created mod to avoid bugs or unpredicted errors. Edited June 18, 2005 by perkin Link to comment Share on other sites More sharing options...
Arvin_S Posted June 19, 2005 Author Share Posted June 19, 2005 Yo~ u know the last mission 2nd part the car "white convertable" you use to save Sweet is invernuble, so u can search for the orginal scm of SA for that part, and try to look for that line(s) u need. It might help to compare how they implement the procedures of each codes in SA by R* with self-created mod to avoid bugs or unpredicted errors. Now I do find a problem.When I'm dancing in the club,there's no arrow below.Now I can't continue the game.I'm stuck in the mission "Life's A Beach" coz there's no arrow. Link to comment Share on other sites More sharing options...
Donald Rack Posted June 19, 2005 Share Posted June 19, 2005 (edited) I was trying to do this myself and I have no experience. Edited June 19, 2005 by Donald Rack Link to comment Share on other sites More sharing options...
Donald Rack Posted June 19, 2005 Share Posted June 19, 2005 (edited) I got it to work and went to a club and saw arrows. There was a short delay at first but I've had that problem before I modded it. EDIT: Did you do what Y_Less said? I just did Life's a Beach and it was fine. Edited June 19, 2005 by Donald Rack Link to comment Share on other sites More sharing options...
Cielos Posted June 25, 2005 Share Posted June 25, 2005 There are some problems I've encountered using this code.. 1. It's impossible to complete the driving school with the tires_vulnerable set to 0, as one of the test requires the tire to blow up to archive the goal. 2. Ok, so I set the tires_vulnerable to 1, compile it and start it all over from the beginning. I'm able to pass the driving school this time... in a ...weird way. As the health of the car is set to 5000, which, I believe, is much more then the original, the damage percentage is always appears in negative for two of the missions, thus I cant even get a bronze for these 2 missions, but somehow newer test is still unlocked. As I think it'd be the only problem for this code, I just go on and continue the game. 3. Finally I get to the last mission... where I gotta chase the firetruck on the white car. After I've saved Sweet from the firetruck, they happened to switch the seat, and I'm supposed to start to shoot while Sweet is driving. And the disaster comes.... the car blow up automatically after they switch the seat... I believe it's because of the 5000 health has exceeded the default value and get a negative value again.. As a result, .......BOM! I've to go through the main.scm to see if there's sth I can do now... ..in the mean time, any of you has use this code and have the same problem with me? And how do you fix this? Thanks in advance! Link to comment Share on other sites More sharing options...
Viper187 Posted June 25, 2005 Share Posted June 25, 2005 (edited) There are some problems I've encountered using this code.. 1. It's impossible to complete the driving school with the tires_vulnerable set to 0, as one of the test requires the tire to blow up to archive the goal. 2. Ok, so I set the tires_vulnerable to 1, compile it and start it all over from the beginning. I'm able to pass the driving school this time... in a ...weird way. As the health of the car is set to 5000, which, I believe, is much more then the original, the damage percentage is always appears in negative for two of the missions, thus I cant even get a bronze for these 2 missions, but somehow newer test is still unlocked. As I think it'd be the only problem for this code, I just go on and continue the game. 3. Finally I get to the last mission... where I gotta chase the firetruck on the white car. After I've saved Sweet from the firetruck, they happened to switch the seat, and I'm supposed to start to shoot while Sweet is driving. And the disaster comes.... the car blow up automatically after they switch the seat... I believe it's because of the 5000 health has exceeded the default value and get a negative value again.. As a result, .......BOM! I've to go through the main.scm to see if there's sth I can do now... ..in the mean time, any of you has use this code and have the same problem with me? And how do you fix this? Thanks in advance! I had the same problem on the last mission. It's because the thing subtracts something from your car health and makes it kill you if your car health is less than 12000. I was able to get away with editing 2 lines in the mission itself to fix whil keeping my save game loadable. I happened to me at the point you mentioned, and again when it shows a little clip of you going around a bend. The car is @153 in my decompiled script. Look for :FINALEC_1822 and remove this line: 000C: $8013 -= 12000;; integer values and :FINALEC_3557 remove this one: 000C: $8013 -= 12000;; integer values Oh, and if you wanna add to your immunities setup.... 02AA: set_car @0 immune_to_nonplayer 1020A: set_car @0 door_status_to 2:SNAKEMOD01B00D6: if 2100E1: key_pressed 0 6;; handbrake8449: NOT actor $PLAYER_ACTOR in_a_car004D: jump_if_false ££SNAKEMOD01C020A: set_car @0 door_status_to 1:SNAKEMOD01C00D6: if 00241: player $PLAYER_CHAR in_remote_mode004D: jump_if_false ££SNAKEMOD020484: @0 = player $PLAYER_CHAR rc_car02AC: set_car @0 immunities 1 1 1 1 102AA: set_car @0 immune_to_nonplayer 1 That'll give you locking doors that unlock while holding handbrake, maybe some extra immunity, and it'll give RC cars immunities. If you wanna screw over that Driving school mission: find::DSKOOL_435000BE: text_clear_all0051: returnreplace with::DSKOOL_435000D6: if 000E1: key_pressed 0 19;; submission004D: jump_if_false £DSKOOL_4350B0004: $271 = 100 ;; integer values:DSKOOL_4350B00BE: text_clear_all0051: return Hold the Sub-Mission ('2' key by default) button as the time runs out to get a Golf ofr anything in driving school. Edited June 25, 2005 by Viper187 Link to comment Share on other sites More sharing options...
Cielos Posted June 25, 2005 Share Posted June 25, 2005 (edited) Thanks Viper187!! You saved my life!! I'd be dead if I have to play all over from the beginning again just to get pass one mission only...!! You know I just added some lines to this super car code so that it'd be activate only with certain keys pressed. Finished the testing and got to the first save point just now.. and there I saw your suggestion~ Thousand thanks Viper187!!! So the health was being too small, not too large...! My car wont blow out finally~~ I may as well try these scripts you wrote when I have time to replay the game once more... the “car lock” seems interesting, guess I dont need to avoid the cops when they are about to open my car door anymore... humhum... Edited June 25, 2005 by Cielos Link to comment Share on other sites More sharing options...
Zach Posted June 25, 2005 Share Posted June 25, 2005 Maybe this is just a case of me knowing only enough to get me in trouble, but when setting the following: 02AC: set_car @0 immunities 1 1 1 1 102AA: set_car @0 immune_to_nonplayer 1 I don't actually see the point in adjusting the car's health, hence, I don't. I mean, it is somewhat superficial and redundant, and I don't see what one would gain by doing it. <shrug> 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