Quantcast

Jump to content

» «
Photo

[III] Teleport Script

26 replies to this topic
arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#1

Posted 24 June 2014 - 08:15 AM Edited by Doc 1985, 24 June 2014 - 08:15 AM.

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 @TELEPORT

03BC: $1607 = create_sphere 1057.3099 -953.0805 14.8227 210.2222

I put it at the end


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#2

Posted 24 June 2014 - 08:57 AM

EDIT: I also tried with this 

:TELEPORT
004F: create_thread @TELEPORT 
03BC: $1607 = create_sphere 1037.9987 -888.332 14.9727 1.0
004E: end_thread 

xNCx
  • xNCx

    Street Cat

  • Members
  • Joined: 15 May 2008
  • None

#3

Posted 24 June 2014 - 09:49 AM

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.


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#4

Posted 24 June 2014 - 10:20 AM

1: Yes

2: I'll Try

3:I'll try

4: I  told ya, I'm a noob


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#5

Posted 24 June 2014 - 10:49 AM

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?


Silent
  • Silent

    Altering R* Vision™ since 2008

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#6

Posted 24 June 2014 - 12:48 PM

http://gtaforums.com...entry1060479200

arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#7

Posted 25 June 2014 - 10:26 AM

Does it work for III?


Silent
  • Silent

    Altering R* Vision™ since 2008

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#8

Posted 25 June 2014 - 10:08 PM

It should, yeah.

arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#9

Posted 25 June 2014 - 10:20 PM

I can not find the opcode showed in the post.

ED-E
  • ED-E

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#10

Posted 27 June 2014 - 04:34 AM Edited by ChopTheDog., 27 June 2014 - 04:35 AM.

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  

arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#11

Posted 27 June 2014 - 10:06 AM

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


xNCx
  • xNCx

    Street Cat

  • Members
  • Joined: 15 May 2008
  • None

#12

Posted 27 June 2014 - 04:27 PM

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

:Loop
wait 100
jump @Loop

 

but this will immediately shutdown your script

:Loop
wait 100
004E: end_thread //END OF SCRIPT
jump @Loop

 

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

 

That's how it works.

  • ED-E likes this

arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#13

Posted 27 June 2014 - 05:08 PM

If I use the script it crashes...


ED-E
  • ED-E

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#14

Posted 27 June 2014 - 05:13 PM

If I use the script it crashes...

 

Okay, does the Sphere even render?


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#15

Posted 27 June 2014 - 05:17 PM

Yes.


ED-E
  • ED-E

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#16

Posted 27 June 2014 - 05:21 PM

Yes.

 

Show me your code.


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#17

Posted 27 June 2014 - 05:25 PM

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

ED-E
  • ED-E

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#18

Posted 27 June 2014 - 05:31 PM

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


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#19

Posted 27 June 2014 - 05:45 PM

I found this 

0055: put_player $PLAYER_CHAR at 888.5625 -308.3749 -99.9999 


EDIT: It crashes :(


xNCx
  • xNCx

    Street Cat

  • Members
  • Joined: 15 May 2008
  • None

#20

Posted 29 June 2014 - 12:28 PM

I prefer to use ACTOR opcodes instead of PLAYER

Try this http://www.gtamoddin....php?title=00A1.


ED-E
  • ED-E

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#21

Posted 29 June 2014 - 12:55 PM Edited by ChopTheDog., 29 June 2014 - 12:59 PM.

I prefer to use ACTOR opcodes instead of PLAYER

Try this http://www.gtamoddin....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.


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#22

Posted 30 June 2014 - 06:55 PM

So? Nothing?


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#23

Posted 01 July 2014 - 08:58 PM

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_1
thread 'PUTPLAY'

:PUTPLAY_12
wait  0
if
0256:   player $PLAYER_CHAR defined
jf @PUTPLAY_12
if  and
80E0: not  player $PLAYER_CHAR driving
05EE:  key_pressed 80//--------------------------- 	p key
jf @PUTPLAY_12
0055: put_player $PLAYER_CHAR at 907.7438 -460.5194 14.9727
wait 1500
jump @PUTPLAY_12

arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#24

Posted 02 July 2014 - 06:51 AM

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


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#25

Posted 02 July 2014 - 08:36 AM

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


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#26

Posted 02 July 2014 - 03:10 PM

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_3719
01E3: text_1number_styled 'M_PASS' 4000 5000 ms 1
0318: 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_level
004F: create_thread @Put_playeractor_at// <----  thread start code
0051: return

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

:Put_playeractor_at
thread 'PUTPLAY'

:PUTPLAY_12
wait  0
if
0256:   player $PLAYER_CHAR defined
jf @PUTPLAY_12
if
019C:   player $PLAYER_CHAR 1 826.2629 -953.9326 33.1  842.5394 -945.8651 35.5
jf @PUTPLAY_12
0055: put_player $PLAYER_CHAR at 907.7438 -460.5194 14.9727
004E: end_thread

//first missionscript of originally main.scm = Intro mission

//-------------Mission 0---------------
// Originally: Intro Movie

:INTRO
0004: $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


arvark
  • arvark

    Oh yes, we'll keep on trying.

  • BUSTED!
  • Joined: 22 Nov 2013
  • Italy

#27

Posted 02 July 2014 - 06:14 PM

Thanks. 





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users