GodGell Posted June 23, 2005 Share Posted June 23, 2005 hey. i have done 4 mods (forward gravity meter, acceleration meter, speedometer, and realistic accidents) for VC, and i've done all of which in the program called Giddy by Rick. but now i have to get used to Barton's mission builder's pretty different syntax since there's no Giddy for SA. but the syntax is the smaller problem. the bigger problem is, i can't even get a thread running. in the first part of main.scm i look for the part where the threads are created (with create_thread). i append the line "004F: create_thread ££HELIMG_1" to the end to create my thread. at the very end of the file goes my thread: :HELIMG_103A4: name_thread 'HELIMG':HELIMG_20001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false ££HELIMG_200D6: if 000DF: actor $PLAYER_ACTOR driving004D: jump_if_false ££HELIMG_200D6: if 230602: $PLAYER_ACTOR 00DD: actor $PLAYER_ACTOR driving_vehicle_type 48100DD: actor $PLAYER_ACTOR driving_vehicle_type 50900DD: actor $PLAYER_ACTOR driving_vehicle_type 510004D: jump_if_false ££HELIMG_203C0: $63 = actor $PLAYER_ACTOR car0224: set_car $63 health_to 10002: jump ££HELIMG_2 result: crash. no matter how i try, it seems like the create_thread itself crashes it, since anytime i try, it crashes if the thread has been created. i don't know why does this happen as in VC the way to create threads was exactly the same, and that never crashed. what am i doing wrong? btw, as the topic title suggests, i'm trying to do a mod that waits for the player to get into a leviathan then attach a magnet to it. simple. i could easily do it but it's not easy if i can't even get a thread running... Link to comment Share on other sites More sharing options...
Quadropheniac90 Posted June 23, 2005 Share Posted June 23, 2005 I have the same problem, but I now use EXTERNAL_SCRIPT or something, which doesn't work either, I must be doing it wrong 'cause I saw a topic where some people were talking about themselves using it. It doesn't crash though, but it just won't run. I would like to help you out, but I've got the same problem Link to comment Share on other sites More sharing options...
GodGell Posted June 23, 2005 Author Share Posted June 23, 2005 I have the same problem, but I now use EXTERNAL_SCRIPT or something, which doesn't work either, I must be doing it wrong 'cause I saw a topic where some people were talking about themselves using it. It doesn't crash though, but it just won't run. I would like to help you out, but I've got the same problem hmm i heard somewhere that the external script thing was ps2 specific and doesn't work in the real version, that might be the reason. but not a reason for the create_thread thing Link to comment Share on other sites More sharing options...
ThaKilla Posted June 23, 2005 Share Posted June 23, 2005 Just a guess.... but did you change :MAIN_103A4: name_thread 'MAIN'016A: fade 0 () 0 ms--> 042C: set_total_missions_to 147--> 030D: set_total_mission_points_to 1870997: 1339 Link to comment Share on other sites More sharing options...
GodGell Posted June 23, 2005 Author Share Posted June 23, 2005 Just a guess.... but did you change :MAIN_103A4: name_thread 'MAIN'016A: fade 0 () 0 ms--> 042C: set_total_missions_to 147--> 030D: set_total_mission_points_to 1870997: 1339 i didn't change those because this will not be a mission, but a continous loop. Link to comment Share on other sites More sharing options...
Viper187 Posted June 23, 2005 Share Posted June 23, 2005 :HELIMG_103A4: name_thread 'HELIMG':HELIMG_20001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false ££HELIMG_200D6: if 000DF: actor $PLAYER_ACTOR driving004D: jump_if_false ££HELIMG_200D6: if 230602: $PLAYER_ACTOR 00DD: actor $PLAYER_ACTOR driving_vehicle_type 48100DD: actor $PLAYER_ACTOR driving_vehicle_type 50900DD: actor $PLAYER_ACTOR driving_vehicle_type 510004D: jump_if_false ££HELIMG_203C0: $63 = actor $PLAYER_ACTOR car0224: set_car $63 health_to 10002: jump ££HELIMG_2 result: crash. no matter how i try, it seems like the create_thread itself crashes it, since anytime i try, it crashes if the thread has been created. i don't know why does this happen as in VC the way to create threads was exactly the same, and that never crashed. what am i doing wrong? btw, as the topic title suggests, i'm trying to do a mod that waits for the player to get into a leviathan then attach a magnet to it. simple. i could easily do it but it's not easy if i can't even get a thread running... I thought of doing the magnet too, but then I forgot about it. I might get around to it by tomorrow. Anyway, I don't see anything wrong with your code, and since you modded Vice, I assume you know where to place it. Only thing different from what I write is I don't bother naming my threads, and I have no idea what 0602 does. Did you just copy that from somewhere or do you know the function of it? Cause I've never needed it. Link to comment Share on other sites More sharing options...
GodGell Posted June 23, 2005 Author Share Posted June 23, 2005 (edited) I thought of doing the magnet too, but then I forgot about it. I might get around to it by tomorrow. Anyway, I don't see anything wrong with your code, and since you modded Vice, I assume you know where to place it. Only thing different from what I write is I don't bother naming my threads, and I have no idea what 0602 does. Did you just copy that from somewhere or do you know the function of it? Cause I've never needed it. if the thread creating wouldnt crash the game i'd be already in bed (instead of trying to sort it out even tho i havent slept for nearly 3 days) and people would be downloading my magnet mod. yes, the code i provided was copied from another thread, becase i thought at first that the problem is with my thread. so i copied another one that was originally in the game (so it surely worked) to see whether it works with that, but nope. it looks like we're not able to create threads. wtf? how are we gonna add new functions, then? Edited June 23, 2005 by GodGell Link to comment Share on other sites More sharing options...
Opius Posted June 23, 2005 Share Posted June 23, 2005 As a general rule, don't use opcodes that refer to $PLAYER_CHAR. Use the appropriate actor commands instead, and use $PLAYER_ACTOR. Link to comment Share on other sites More sharing options...
GodGell Posted June 23, 2005 Author Share Posted June 23, 2005 (edited) As a general rule, don't use opcodes that refer to $PLAYER_CHAR. Use the appropriate actor commands instead, and use $PLAYER_ACTOR. ok, Opius, but that was just a test code. i copied it from another thread to test whether it's my thread that crashes the game or something else. since it still crashes with this code too, it looks like the crash is around the thread creation itself. is there an exception handler for SA? hmm, i have heard (not sure) that main.scm in SA is divided into segments or what. if so, maybe i'll have to put my thread in the same segment as the create_thread is. but just guessing. btw, here is the original code i tried it with: :HELIMGN0001: wait 000d6: if 00256: is_defined $PLAYER_CHAR004d: jf ££HELIMGN00d6: if 000de: is_player_driving_car_model $PLAYER_CHAR, 417 ;; leviathan004d: jf ££HELIMGN03c1: get_player_car $PLAYER_CHAR, @00788: enable_heli @0 magnet 10002: jump ££HELIMGN note that this is my first time using Barton's editor, i always used Giddy before. Edited June 23, 2005 by GodGell Link to comment Share on other sites More sharing options...
Viper187 Posted June 24, 2005 Share Posted June 24, 2005 I helped GodGell get the Heli Magnet Mod working. We've been chatting in IRC and apparently he's unable to reach sites right now for some reason, so he asked me to post the link for him. It's advisable to edit the thrust of your choppers in handling.cfg or you'll have a hard time lifting anything off the ground using the magnet. Link to comment Share on other sites More sharing options...
Opius Posted June 24, 2005 Share Posted June 24, 2005 Ah, now I know why you were getting crashes. Unlike Giddy, Barton's editor stores EVERYTHING in one file. All the missions are underneath the main thread. I think what you did when you say "at the very end of the file goes my thread" is that you actually put inside the last mission. What you need to do instead is find the end of the MAIN part of the script, and place your thread there instead. What I find just as easy though, is searching for 'end_thread', and placing my threads underneath that. Just make sure you don't end up putting your thread inside another, since some threads may end conditionally. Link to comment Share on other sites More sharing options...
TheDude5000 Posted June 24, 2005 Share Posted June 24, 2005 Good luck with this guys, it's been a dream of mine to do this. Also, can someone post a good handling line for a heli to give it enough thrust to lift virtually any vehicle, pretty high? Such as lifting a cop car(with coppers inside) flying over the ocean, and dunking them? That is also another dream of mine. Link to comment Share on other sites More sharing options...
GodGell Posted June 24, 2005 Author Share Posted June 24, 2005 (edited) thanks for your help, Viper187 after a restart i can reach the net fully again. Opius, yes, Viper187 told me to put my thread above mission 0, and it worked today i'll try whether the magnet can be attached to trains. i hope it can be, because this should be fun. btw, in the aircrane mission where this is originally used, you had to lift a securicar with it, so i guess a copcar would be easy without editing the heli's. but i tried lifting a smaller truck with the cargobob and it didn't work. oh, and btw, list of helis that get a magnet in my mod: 417/Leviathan 425/Hunter 487/Maverick 488/VCN Maverick 496/Police Maverick 548/Cargobob 563/Raindance i left stuff like the seasparrow out because they wouldn't be strong enough anyway. as i've predicted, after Viper187 helped me in finding the cause of the crash, it was an easy job to make it work since most of the opcodes are from VC so i knew how to use them, except i needed a bit of getting used to Barton's syntax. here's the thread: :HELIMG0001: wait 3200d6: if 00256: is_defined $PLAYER_CHAR004d: jf ££HELIMG00d6: if 2600DD: actor $PLAYER_ACTOR driving_vehicle_type 41700DD: actor $PLAYER_ACTOR driving_vehicle_type 42500DD: actor $PLAYER_ACTOR driving_vehicle_type 48700DD: actor $PLAYER_ACTOR driving_vehicle_type 48800DD: actor $PLAYER_ACTOR driving_vehicle_type 49700DD: actor $PLAYER_ACTOR driving_vehicle_type 54800DD: actor $PLAYER_ACTOR driving_vehicle_type 563004d: jf ££HELIMG03C0: @0 = actor $PLAYER_ACTOR car0788: enable_heli @0 magnet 10001: wait 2560002: jump ££HELIMG thanks Viper187! Edited June 25, 2005 by GodGell Link to comment Share on other sites More sharing options...
SIP YEK NOD Posted June 24, 2005 Share Posted June 24, 2005 so does this work now? and how do we install it of it does? Link to comment Share on other sites More sharing options...
Quadropheniac90 Posted June 24, 2005 Share Posted June 24, 2005 OK, I now have a mod idea which I think I will be making myself: You have to do a timetrial so you move cars with the helicopter to a point and repeat that process a couple times, but stay under 5 minutes or something. Link to comment Share on other sites More sharing options...
ocram88 Posted June 24, 2005 Share Posted June 24, 2005 with this code you can get the car and then you can set the color for this car for example 078B: $CAR = car_on_heli $HELI magnet unknown @1 @2 Link to comment Share on other sites More sharing options...
GodGell Posted June 24, 2005 Author Share Posted June 24, 2005 so does this work now? and how do we install it of it does? yes it works. download the main.scm from here. rename the main.scm file in data\script to something else (like main.scm.orig), and copy the main.scm you just downloaded. then run SA and start a new game (savegames that you saved with the old main.scm will not work, but this isn't a stripped-out version, so you could even just restart playing the storyline with it) Link to comment Share on other sites More sharing options...
GodGell Posted June 24, 2005 Author Share Posted June 24, 2005 (edited) with this code you can get the carand then you can set the color for this car for example 078B: $CAR = car_on_heli $HELI magnet unknown @1 @2 thanks for the info, that's useful maybe i'll add something to the mod, that display info about the currently attached car on screen. but what are the 2 parameters after "unknown"? edit: btw, today i'll try going up to mt. chiliad with a helicopter, pick up the camper, fly off it and drop it, then try to follow it. it will probably the biggest fall a camper ever seen. Edited June 24, 2005 by GodGell Link to comment Share on other sites More sharing options...
TheDude5000 Posted June 24, 2005 Share Posted June 24, 2005 (edited) Can you guys tell me how to edit handling.cfg to increase heli thrust? Also, can you please upload the main.scm to http://gtagarage.com ? I can't seem to get it in the right format with that link you gave. Edited June 24, 2005 by TheDude5000 Link to comment Share on other sites More sharing options...
thedude777 Posted June 25, 2005 Share Posted June 25, 2005 Can you guys tell me how to edit handling.cfg to increase heli thrust?Also, can you please upload the main.scm to http://gtagarage.com ? I can't seem to get it in the right format with that link you gave. Yea, please upload it to gtagarage.com! Link to comment Share on other sites More sharing options...
TheDude5000 Posted June 25, 2005 Share Posted June 25, 2005 And can someone please tell me how to edit a heli's thrust? So I can lift vehicles pretty high? Is there a way to get rid of the maximum height limit for the game too? Link to comment Share on other sites More sharing options...
DexX Posted June 25, 2005 Share Posted June 25, 2005 dude, you can fly WELL higher than the tallest building in the game, just how high do you want to go ? you can try editing the some of the stats for the chopper in the handling.cfg, but i dont know which one(s) will be able to allow you to lift heavier vehicles. Anyway, if you want to have even more fun, try to grab the helis around you (within a certain radius), and see if one is a police chopper, if it is give it a handle, and see if you can give the police chopper the magnet that would be hardcore. Link to comment Share on other sites More sharing options...
TheDude5000 Posted June 25, 2005 Share Posted June 25, 2005 You can fly to the top of that LS building with a plane, but not a heli. Link to comment Share on other sites More sharing options...
GodGell Posted June 25, 2005 Author Share Posted June 25, 2005 dude, you can fly WELL higher than the tallest building in the game, just how high do you want to go ? you can try editing the some of the stats for the chopper in the handling.cfg, but i dont know which one(s) will be able to allow you to lift heavier vehicles. Anyway, if you want to have even more fun, try to grab the helis around you (within a certain radius), and see if one is a police chopper, if it is give it a handle, and see if you can give the police chopper the magnet that would be hardcore. haha, i just made a video of dropping a hippie van (camper) from above mt. chiliad, then jumping out of the heli to follow it without a parachute, of course... http://195.56.46.139/sa/camper_off_mt_chiliad_magnetmod.avi about the police maverick, i somehow left that one out. the main.scm on my site is now updated with the police maverick. now the only helis that don't get a magnet are the sparrow, the seasparrow, and the RC helis which couldn't even lift the magnet itself. Link to comment Share on other sites More sharing options...
GodGell Posted June 25, 2005 Author Share Posted June 25, 2005 i have submitted my mod to gtagarage.com, waiting to be approved. Link to comment Share on other sites More sharing options...
GodGell Posted June 25, 2005 Author Share Posted June 25, 2005 luckily i met Luke (gtagarage.com admin) on IRC, and he approved my mod quickly, so here is the fast GTAGarage.com link: http://www.gtagarage.com/mods/show.php?id=96 Link to comment Share on other sites More sharing options...
Prodigital Posted June 27, 2005 Share Posted June 27, 2005 WOW ! thanks alot for making this mod ! You just made the funnest thing in the game accessible ! But there's some things i'd rather have different: -The Mavericks and Hunter shouldn't get that magnet, it's a special treat, better make it not too easy to get. How should I remove this ? (what am I loooking for to delete?) -Anybody want to take the trouble of stripping thisscm down to have no missions and the state wide open ? Always nice to have a pure-fun main.scm... Link to comment Share on other sites More sharing options...
GodGell Posted June 27, 2005 Author Share Posted June 27, 2005 WOW ! thanks alot for making this mod ! You just made the funnest thing in the game accessible ! But there's some things i'd rather have different: -The Mavericks and Hunter shouldn't get that magnet, it's a special treat, better make it not too easy to get. How should I remove this ? (what am I loooking for to delete?) -Anybody want to take the trouble of stripping thisscm down to have no missions and the state wide open ? Always nice to have a pure-fun main.scm... i think it's fun, too. the Mavericks got the magnet because it's the only heli that has 4 seats, and therefore it has the advantage that you can transport 7 homies with it (3 in heli + 4 in the attached car:D). the Hunter is the fastest heli, and you can also have some extra fun in it: lower the magnet to the maximum (with a car attached to it), start going forward quickly, then when you've got enough speed, stop as fast as you can. the magnet will swing forward enough for you to be able to shoot the car using the rocket. pretty stylish way to take care of some coppers. about the stripped scm, i have already made one, it's source code is on gtagarage so you can put other mods in it too. Link to comment Share on other sites More sharing options...
Timonator Posted June 29, 2005 Share Posted June 29, 2005 can someone post his modified handling.cfg so you can really lift a car with a helicopter because i cant go higher with a car attached. You can also tell me what i should change in the handling.cfg grtz Timonator Link to comment Share on other sites More sharing options...
GodGell Posted June 30, 2005 Author Share Posted June 30, 2005 can someone post his modified handling.cfg so you can really lift a car with a helicopter because i cant go higher with a car attached. You can also tell me what i should change in the handling.cfg grtz Timonator well, originally most helis can lift cars or small trucks, just not heavier ones. in handling.cfg, go to the plane part and edit the heli's thrust. 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