Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

My mission mods...


Quadropheniac90
 Share

Recommended Posts

Quadropheniac90

I haven't done any mission coding for quite some time, but I'm getting into it a bit more. I'm gonna post little scripts here, move this to the Mission Coding forum if needed.

 

My first script is a little script for Vice City which stores the player's position every 250 ms, and when the player dies, he will spawn at the position on a path closest to the stored coordinates, that's why when you drive into water you will be spawned on the land closest to the place you drowned. This also takes effect when you're busted.

 

You will have to remove the restart_if_busted/restart_if_wasted checks, otherwise you'll still spawn on those predefined locations. I haven't tested this with interiors yet, but I will, soon. Hope this is worth trying, I'll be making many more, most of which will be used in State of Liberty. smile.gif

 

A create_thread should off course be made. smile.gif

 

You have to place this before 'Mission 0' and put an end_thread in it, it crashes when you die if don't.

 

EDIT: When you die or get busted in an interior, you will be placed on the path closest to it in the normal world. biggrin.gif

 

 

:Store0001: wait  250 ms00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]:Dead00D6: if 00118:   actor $PLAYER_ACTOR dead004D: jump_if_false ££Store0001: wait 0 ms00A1: put_actor $PLAYER_ACTOR at  [email protected] [email protected] [email protected]

 

 

For the ones who don't want to mess around with their SCM, PM me and I'll send you either a stripped SCM with the feature, or a normal one. smile.gif

Edited by teun.steenbekkers
user posted image
Link to comment
Share on other sites

You know this is the default behaviour for a stripped script? If there are no restart point defined the game will automatically place you on the nearest ped path point.

Link to comment
Share on other sites

Quadropheniac90

I tested it without 'restart_if' codes and without my code and it would spawn me beneath the Leaf Links Club. confused.gif Oh well, even if my way is more of a hassle to do, I did something.

 

EDIT: Hmmm, you're right. Well then, I'll just leave it there, so people know that the 'restart_if' opcodes should all be deleted for the respawning to work, with or without that piece of code, I'd say it just takes space... smile.gif

Edited by teun.steenbekkers
user posted image
Link to comment
Share on other sites

Quadropheniac90

OK, a new script, I still have to figure this one out a bit, the last three parameters of the 'distribution_actor' opcode, I don't know exactly what those do. Anyways:

 

This script select a pedestrian every 2 seconds and gives it a variable, then it removes any reference to the ped, because otherwise the engine would be stressed and it'd crash. There are alot of possibilities here. For example:

 

1. Make random peds Tommy, or Phil, or Lance, or, well, every IGActor. biggrin.gif Well, just one model at a time.

2. Make random peds burn and fade away when dead.

3. Make peds' cars explode.

4. Make peds hold their cellphones.

5. Make peds explode.

6. Make peds riot.

7. Make yourself a celebrity (everybody looking at you).

8. Many more.

 

I will post some example codes when I get them figured out allright. smile.gif

 

 

:Storecoords0001: wait 0 ms0054: store_player $PLAYER_CHAR position_to $POSX $POSY $POSZ0086: $POSXADD = $POSX;; floating-point values only0009: $POSXADD +=  20.0;; floating-point values0086: $POSYADD = $POSY;; floating-point values only0009: $POSYADD +=  20.0;; floating-point values0086: $POSXMIN = $POSX;; floating-point values only000D: $POSXMIN -=  20.0;; floating-point values0086: $POSYMIN = $POSY;; floating-point values only000D: $POSYMIN -=  20.0;; floating-point values:Getactor0001: wait 3000 ms058F: unknown_create_distribution_actor [email protected] at $POSXADD $POSYADD or_at $POSXMIN $POSYMIN flag  1  0  1:Setactor0001: wait 0 ms:Remove01C2: remove_references_to_actor [email protected]: jump ££Storecoords

 

 

OK, this is an example that didn't crash due to memory errors (At least I think they were...) This script fades peds in a range of 20 around you away. It works pretty well, I walked down the street and every single ped disappeared in front of me. Except for cops, but I think they're 'immune' for mission scripting. biggrin.gif Have fun:

 

 

:Storecoords0001: wait 0 ms0054: store_player $PLAYER_CHAR position_to $POSX $POSY $POSZ0086: $POSXADD = $POSX;; floating-point values only0009: $POSXADD +=  20.0;; floating-point values0086: $POSYADD = $POSY;; floating-point values only0009: $POSYADD +=  20.0;; floating-point values0086: $POSXMIN = $POSX;; floating-point values only000D: $POSXMIN -=  20.0;; floating-point values0086: $POSYMIN = $POSY;; floating-point values only000D: $POSYMIN -=  20.0;; floating-point values:Getactor0001: wait 3000 ms058F: unknown_create_distribution_actor [email protected] at $POSXADD $POSYADD or_at $POSXMIN $POSYMIN flag  1  0  1:Setactor0001: wait 0 ms034F: destroy_actor_with_fade [email protected]:Remove01C2: remove_references_to_actor [email protected]: jump ££Storecoords

 

Edited by teun.steenbekkers
user posted image
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

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