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. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    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 IV 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 SA Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA III 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

arvark

[III] Teleport Script

Recommended Posts

arvark

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

Share this post


Link to post
Share on other sites
arvark

EDIT: I also tried with this

:TELEPORT004F: create_thread @TELEPORT 03BC: $1607 = create_sphere 1037.9987 -888.332 14.9727 1.0004E: end_thread 

Share this post


Link to post
Share on other sites
xNCx

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.

Share this post


Link to post
Share on other sites
arvark

1: Yes

2: I'll Try

3:I'll try

4: I told ya, I'm a noob

Share this post


Link to post
Share on other sites
arvark

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?

Share this post


Link to post
Share on other sites
arvark

Does it work for III?

Share this post


Link to post
Share on other sites
Silent

It should, yeah.

Share this post


Link to post
Share on other sites
arvark

I can not find the opcode showed in the post.

Share this post


Link to post
Share on other sites
Node

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.

Share this post


Link to post
Share on other sites
arvark

Thanks a lot :). I couldn't find the right opcodes :)

Share this post


Link to post
Share on other sites
xNCx

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.

Share this post


Link to post
Share on other sites
arvark

If I use the script it crashes...

Share this post


Link to post
Share on other sites
Node

If I use the script it crashes...

 

Okay, does the Sphere even render?

Share this post


Link to post
Share on other sites
arvark

Yes.

Share this post


Link to post
Share on other sites
Node

Yes.

 

Show me your code.

Share this post


Link to post
Share on other sites
arvark


{$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

Share this post


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

Share this post


Link to post
Share on other sites
arvark

I found this

0055: put_player $PLAYER_CHAR at 888.5625 -308.3749 -99.9999 

EDIT: It crashes :(

Share this post


Link to post
Share on other sites
Node

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.

Share this post


Link to post
Share on other sites
arvark

So? Nothing?

Share this post


Link to post
Share on other sites
ZAZ

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

Share this post


Link to post
Share on other sites
arvark

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

Share this post


Link to post
Share on other sites
arvark

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

Share this post


Link to post
Share on other sites
ZAZ

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

Share this post


Link to post
Share on other sites
arvark

Thanks.

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.
Note: Your post will require moderator approval before it will be visible.

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.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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