arvark Posted June 24, 2014 Share Posted June 24, 2014 (edited) 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 June 24, 2014 by Doc 1985 Link to comment Share on other sites More sharing options...
arvark Posted June 24, 2014 Author Share Posted June 24, 2014 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 More sharing options...
xNCx Posted June 24, 2014 Share Posted June 24, 2014 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 More sharing options...
arvark Posted June 24, 2014 Author Share Posted June 24, 2014 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 More sharing options...
arvark Posted June 24, 2014 Author Share Posted June 24, 2014 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 More sharing options...
Silent Posted June 24, 2014 Share Posted June 24, 2014 http://gtaforums.com/topic/403594-gta-sa-cleo-script-tutorial/page-8?do=findComment&comment=1060479200 Link to comment Share on other sites More sharing options...
arvark Posted June 25, 2014 Author Share Posted June 25, 2014 Does it work for III? Link to comment Share on other sites More sharing options...
Silent Posted June 25, 2014 Share Posted June 25, 2014 It should, yeah. Link to comment Share on other sites More sharing options...
arvark Posted June 25, 2014 Author Share Posted June 25, 2014 I can not find the opcode showed in the post. Link to comment Share on other sites More sharing options...
Node Posted June 27, 2014 Share Posted June 27, 2014 (edited) 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 June 27, 2014 by ChopTheDog. Link to comment Share on other sites More sharing options...
arvark Posted June 27, 2014 Author Share Posted June 27, 2014 Thanks a lot . I couldn't find the right opcodes Link to comment Share on other sites More sharing options...
xNCx Posted June 27, 2014 Share Posted June 27, 2014 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. Node 1 Link to comment Share on other sites More sharing options...
arvark Posted June 27, 2014 Author Share Posted June 27, 2014 If I use the script it crashes... Link to comment Share on other sites More sharing options...
Node Posted June 27, 2014 Share Posted June 27, 2014 If I use the script it crashes... Okay, does the Sphere even render? Link to comment Share on other sites More sharing options...
arvark Posted June 27, 2014 Author Share Posted June 27, 2014 Yes. Link to comment Share on other sites More sharing options...
Node Posted June 27, 2014 Share Posted June 27, 2014 Yes. Show me your code. Link to comment Share on other sites More sharing options...
arvark Posted June 27, 2014 Author Share Posted June 27, 2014 {$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 More sharing options...
Node Posted June 27, 2014 Share Posted June 27, 2014 {$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 More sharing options...
arvark Posted June 27, 2014 Author Share Posted June 27, 2014 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 More sharing options...
xNCx Posted June 29, 2014 Share Posted June 29, 2014 I prefer to use ACTOR opcodes instead of PLAYER Try this http://www.gtamodding.com/index.php?title=00A1. Link to comment Share on other sites More sharing options...
Node Posted June 29, 2014 Share Posted June 29, 2014 (edited) 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 June 29, 2014 by ChopTheDog. Link to comment Share on other sites More sharing options...
arvark Posted June 30, 2014 Author Share Posted June 30, 2014 So? Nothing? Link to comment Share on other sites More sharing options...
ZAZ Posted July 1, 2014 Share Posted July 1, 2014 0055 is right and you must insert $PLAYER_CHARIII and vc have much opcodes that needs to insert $PLAYER_CHAR and changed for SA to use with $PLAYER_ACTORa 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
arvark Posted July 2, 2014 Author Share Posted July 2, 2014 Thanks to your script I made that if I go to a sphere I get teleported. Link to comment Share on other sites More sharing options...
arvark Posted July 2, 2014 Author Share Posted July 2, 2014 How do I lock this until the end of a mission? Link to comment Share on other sites More sharing options...
ZAZ Posted July 2, 2014 Share Posted July 2, 2014 assuming that you work with main.scm, then put the thread start code to the mission passed blockexample: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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
arvark Posted July 2, 2014 Author Share Posted July 2, 2014 Thanks. 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