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.

[III] Teleport Script


arvark
 Share

Recommended Posts

I'd like to do a teleport script for III. If I'm in the sphere then the player gets to the choords I put in.

 

I created the sphere, but it doesn't even appears.

 

I'm very noob, so 99% the code is wrong.

004F: create_thread @TELEPORT03BC: $1607 = create_sphere 1057.3099 -953.0805 14.8227 210.2222

I put it at the end

Edited by Doc 1985
Link to comment
Share on other sites

EDIT: I also tried with this

:TELEPORT004F: create_thread @TELEPORT 03BC: $1607 = create_sphere 1037.9987 -888.332 14.9727 1.0004E: end_thread 
Link to comment
Share on other sites

1. Are you sure you have entered the right coordinates?

2. Is the code executed? If you are not sure, put for example the PLAY MUSIC opcode so you know it is executed.

3. I'm not sure, but maybe you need to put this in a loop?

4. Why end_thread? This ends your code.

Link to comment
Share on other sites

1: Yes

2: I'll Try

3:I'll try

4: I told ya, I'm a noob

Link to comment
Share on other sites

I did it, now I can see the sphere. How do I make that if I go in the sphere, I get in the choords I put in?

Link to comment
Share on other sites

It should, yeah.

Link to comment
Share on other sites

Firstly, whilst Sanny Builder is running, start GTA III and go to the location where the player will teleport to when they enter the sphere.

 

1. Minimize GTA III.

2. Open your Sanny Builder then:

Right click -> Insert -> Player Coords

3. Save these for later.

4. Use this script:

{$CLEO}0000::1//Wait 0 milliseconds.wait 0//The IF statement.                                                                   if     //The number after "$PLAYER_ACTOR" sets the visibility of the sphere; 0 = false, 1 = true.//You also need to change the coordinates after "1" and choose a radius, this is where the Sphere will be placed.           00FF:   actor $PLAYER_ACTOR 1 1209.375 -807.1874 14.0 radius 4.0 4.0 4.0//Jump to the label ":1" if the condition before it was false, in this case, if the player isn't in the sphere. jf @1  //Replace the following coordinates with the ones you obtained from the game and the player will "teleport" there.     00A1: put_actor $PLAYER_ACTOR at 1204.1875 -801.8749 13.6875  //Stop the script.           end_thread  
Edited by ChopTheDog.
Link to comment
Share on other sites

Just to mention, end_thread does what it does - it ends your script.

 

For example the code below is a proper loop - it will be executed all the time

 

:Loopwait 100jump @Loop

 

but this will immediately shutdown your script

 

:Loopwait 100004E: end_thread //END OF SCRIPTjump @Loop

 

Which means that jump @Loop won't be executed.

 

That's how it works.

Link to comment
Share on other sites

If I use the script it crashes...

 

Okay, does the Sphere even render?

Link to comment
Share on other sites


{$CLEO}

0000:

 

:1

//Wait 0 milliseconds.

wait 0

//The IF statement.

if

//The number after "$PLAYER_ACTOR" sets the visibility of the sphere; 0 = false, 1 = true.

//You also need to change the coordinates after "1" and choose a radius, this is where the Sphere will be placed.

00FF: actor $PLAYER_ACTOR 1 862.7654 -303.2402 8.1259 radius 4.0 4.0 4.0

//Jump to the label ":1" if the condition before it was false, in this case, if the player isn't in the sphere.

jf @1

//Replace the following coordinates with the ones you obtained from the game and the player will "teleport" there.

00A1: put_actor $PLAYER_ACTOR at 766.9392 -837.3967 14.750

Link to comment
Share on other sites

{$CLEO}0000::1//Wait 0 milliseconds.wait 0//The IF statement.                                                                   if     //The number after "$PLAYER_ACTOR" sets the visibility of the sphere; 0 = false, 1 = true.//You also need to change the coordinates after "1" and choose a radius, this is where the Sphere will be placed.           00FF:   actor $PLAYER_ACTOR 1 862.7654 -303.2402 8.1259 radius 4.0 4.0 4.0//Jump to the label ":1" if the condition before it was false, in this case, if the player isn't in the sphere. jf @1  //Replace the following coordinates with the ones you obtained from the game and the player will "teleport" there.     00A1: put_actor $PLAYER_ACTOR at 766.9392 -837.3967 14.750

 

I'm going to take a wild guess and say that 00A1: is the cause, but since I don't have GTA III installed, I can't really check. Try looking for other opcodes that move the player from A to B.

Link to comment
Share on other sites

I found this

0055: put_player $PLAYER_CHAR at 888.5625 -308.3749 -99.9999 

EDIT: It crashes :(

Link to comment
Share on other sites

I prefer to use ACTOR opcodes instead of PLAYER

Try this http://www.gtamodding.com/index.php?title=00A1.

 

I take it that you didn't read the entire thread?

 

My code already used 00A1: but I couldn't test it because I don't have III installed.

 

Also, end_thread shouldn't affect the script because it is only called after the script is out of the loop and has "teleported" the player to the specified location.

Edited by ChopTheDog.
Link to comment
Share on other sites

0055 is right and you must insert $PLAYER_CHAR
III and vc have much opcodes that needs to insert $PLAYER_CHAR and changed for SA to use with $PLAYER_ACTOR

a working script on gtaIII:

{$CLEO}:Put_playeractor_at_1thread 'PUTPLAY':PUTPLAY_12wait  0if0256:   player $PLAYER_CHAR definedjf @PUTPLAY_12if  and80E0: not  player $PLAYER_CHAR driving05EE:  key_pressed 80//--------------------------- 	p keyjf @PUTPLAY_120055: put_player $PLAYER_CHAR at 907.7438 -460.5194 14.9727wait 1500jump @PUTPLAY_12
Link to comment
Share on other sites

Thanks to your script I made that if I go to a sphere I get teleported.

Link to comment
Share on other sites

How do I lock this until the end of a mission?

Link to comment
Share on other sites

assuming that you work with main.scm, then put the thread start code to the mission passed block

example:Mission 18, "Her Lover"

the mission passed block:

:MEAT4_371901E3: text_1number_styled 'M_PASS' 4000 5000 ms 10318: set_latest_mission_passed 'MEA4'030C: set_mission_points += 1 0394: play_music 1 0109: player $PLAYER_CHAR money += 4000 0004: $292 = 1 0110: clear_player $PLAYER_CHAR wanted_level004F: create_thread @Put_playeractor_at// <----  thread start code0051: return

Add the teleportscript to the main part, directly before the first missionscript

:Put_playeractor_atthread 'PUTPLAY':PUTPLAY_12wait  0if0256:   player $PLAYER_CHAR definedjf @PUTPLAY_12if019C:   player $PLAYER_CHAR 1 826.2629 -953.9326 33.1  842.5394 -945.8651 35.5jf @PUTPLAY_120055: put_player $PLAYER_CHAR at 907.7438 -460.5194 14.9727004E: end_thread//first missionscript of originally main.scm = Intro mission//-------------Mission 0---------------// Originally: Intro Movie:INTRO0004: $ONMISSION = 1 // integer values 0004: $1112 = 0 // integer values 0001: wait 0 ms 03A4: name_thread 'INTRO'

To do that with the Intro mission is more complicate because the first mission starts immediately at end of Intro mission

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.