Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

GodGell

heli magnet mod...

Recommended Posts

GodGell

hey. smile.gif

 

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? smile.gif

 

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...

Share this post


Link to post
Share on other sites
Quadropheniac90
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 smile.gif

Share this post


Link to post
Share on other sites
GodGell
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 smile.gif

hmm smile.gif 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 sad.gif

 

Share this post


Link to post
Share on other sites
ThaKilla

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 

 

Share this post


Link to post
Share on other sites
GodGell
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.

Share this post


Link to post
Share on other sites
Viper187
: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? smile.gif

 

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.

 

 

Share this post


Link to post
Share on other sites
GodGell

 

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. biggrin.gif

 

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? sad.gif

Edited by GodGell

Share this post


Link to post
Share on other sites
Opius

As a general rule, don't use opcodes that refer to $PLAYER_CHAR. Use the appropriate actor commands instead, and use $PLAYER_ACTOR.

Share this post


Link to post
Share on other sites
GodGell

 

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? smile.gif

 

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 by GodGell

Share this post


Link to post
Share on other sites
Viper187

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.

 

Share this post


Link to post
Share on other sites
Opius

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.

Share this post


Link to post
Share on other sites
TheDude5000

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. devil.gif

Share this post


Link to post
Share on other sites
GodGell

thanks for your help, Viper187 smile.gif 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 smile.gif

today i'll try whether the magnet can be attached to trains. i hope it can be, because this should be fun. biggrin.gif

 

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! smile.gif

Edited by GodGell

Share this post


Link to post
Share on other sites
SIP YEK NOD
so does this work now? and how do we install it of it does?

Share this post


Link to post
Share on other sites
Quadropheniac90
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.

Share this post


Link to post
Share on other sites
ocram88

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

 

Share this post


Link to post
Share on other sites
GodGell
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)

Share this post


Link to post
Share on other sites
GodGell

 

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

 

thanks for the info, that's useful smile.gif 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"? smile.gif

 

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. biggrin.gif it will probably the biggest fall a camper ever seen.

Edited by GodGell

Share this post


Link to post
Share on other sites
TheDude5000

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 by TheDude5000

Share this post


Link to post
Share on other sites
thedude777

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!

Share this post


Link to post
Share on other sites
TheDude5000

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?

Share this post


Link to post
Share on other sites
DexX

dude, you can fly WELL higher than the tallest building in the game, just how high do you want to go dontgetit.gif ?

 

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 biggrin.gif

that would be hardcore.

Share this post


Link to post
Share on other sites
TheDude5000

You can fly to the top of that LS building with a plane, but not a heli.

Share this post


Link to post
Share on other sites
GodGell
dude, you can fly WELL higher than the tallest building in the game, just how high do you want to go dontgetit.gif ?

 

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 biggrin.gif

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 biggrin.gif 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. biggrin.gif

Share this post


Link to post
Share on other sites
GodGell

i have submitted my mod to gtagarage.com, waiting to be approved. smile.gif

Share this post


Link to post
Share on other sites
Prodigital

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...

Share this post


Link to post
Share on other sites
GodGell

 

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...

biggrin.gif i think it's fun, too. smile.gif

 

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. biggrin.gif

 

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.

Share this post


Link to post
Share on other sites
Timonator

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

Share this post


Link to post
Share on other sites
GodGell
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.