Jump to content

Need help creating teleporter things


Freakorama

Recommended Posts

All i know is how to spawns cars

There are no tutorials that tell you how to make teleporter markers

so would like to create a simple walk into the pink marker appear in another place code, just that simple as sitting

 

oh yeah, I use Sanny

Any help would be great.

Link to comment
Share on other sites

Doomed_Space_Marine

Just make the game check if you're in the marker by using 00FE. If it returns true, then put actor $PLAYER_ACTOR to other place. Did I help you?

Link to comment
Share on other sites

No, in fact I have no idea what you just said.

all i want is a code that will teleport me from

here: -601.1 1094.7 26.0

to here: -614.8 -95.3 26.0

Edited by Futurama_Freak1
Link to comment
Share on other sites

spaceeinstein

If you want a simple code to teleport yourself, why is it not simple enough for you to understand how to do it?

 

:Label

wait 0

if

actor $player_actor in_sphere X Y Z radius rX rY rZ sphere 1

jf :@Label

put_actor_at X Y Z

jump @Label

Link to comment
Share on other sites

That just looks like gibberish to me,

but I understand it a little more i'll just fiddle around see if I do it right

Edited by Futurama_Freak1
Link to comment
Share on other sites

:Label

- Your label. Wow!

 

wait 0

- Needed before all if checks

 

if

actor $player_actor in_sphere X Y Z radius rX rY rZ sphere 1

- if the player is in a certain range; i.e., where you want them to teleport from, in a raduis (X, Y, Z, with a radius of rX, rY, rZ)

 

jf :@Label

- if not, jump back to beginning

 

put_actor_at X Y Z

- if yes, put the actor where you want to. This XYZ is NOT the same as the first; this would be the coords you wish to send the actor to.

 

jump @Label

-jump back to your check, or maybe some new code.

Link to comment
Share on other sites

 

:telewait 0if00FE: actor $player_actor 0 -601.1 1094.7 22.0 radius 1.0 1.0 5.0 00A1: put_actor $player_actor at -614.8 -95.3 22.0 jump @tele 

 

This is as much sense as I could make out of it it seems to spawn me at -601.1 1094.7 22.0 over and over when I start new game

 

Sanny would not let me put a "jf :@Label" thingy in the thread

it said something about params and i have no clue what they are

Link to comment
Share on other sites

It's looping all the time because it's not instructed to go somewhere else if the condition is false. wink.gif

The reason for the SB error is the ':' that was erroneously put into the jf line by ceedj.

The line should look like this:

jf @Label

 

The ':' is used to define a label, the '@' references previously defined labels, so you can't use both of them one after the other!

Link to comment
Share on other sites

The reason for the SB error is the ':' that was erroneously put into the jf line by ceedj.

Yeah, sorry about that. Between SB, MB, C++ hooks, memory hacking and now some light ASM, I totally mix my expressions when explaining stuff.

 

However, this would be an excellent case of rule #2 in mission coding: consult original code. wink.gif

Link to comment
Share on other sites

ok so i'm past that spawning in the same place over and over thingy

now my code looks like this

 

 

:telewait 0if00FE: actor $player_actor 0 -601.1 1094.7 22.0 radius 1.0 1.0 5.0jf @tele00A1: put_actor $player_actor at -614.8 -95.3 22.0 jump @tele 

 

 

And there is no pink teleporter at -601.1 1094.7 22.0

and when I stand in that position I don't teleport anywhere

whats wrong now?

Edited by Futurama_Freak1
Link to comment
Share on other sites

Why not just ENEX?!

 

 

 

 

enex2447.66, -1715.22, 13.0684, 2.37455, 0.5, 0.5, 8, 2443.6, -1731.01, 0.390142, 0.0649961, 0, 0, "drtdggHs1", 0, 0, 0, 24end

 

 

That one won't move a vehicle, but as seen in the "tallest building in

Los Santos", it can be set to move vehicles with you.

 

-derty

LUCK FOR A BUCK!!!!! f*ck Yea!

 

GTAF's Most Annoying Unbanned Member.

user posted image

bai. -jllr

Link to comment
Share on other sites

My code is for Vice City! craps sake...

can't somebody tell me how to do with without only explaining 1/4 of it and making mistakes >.<

 

Why is it so f*cking hard for someone to tell me, how to make a code that will get me from Point A to Point B.

 

What is the damn problem?

Edited by Futurama_Freak1
Link to comment
Share on other sites

lol. AND an edit to "clean it up". tounge.gif Well I didn't know! tounge.gif

 

"PINK" marker I guess was my clue. I was wondering too... like...

"Why the f*ck does his monitor show pink? Mine are RED!" lol

 

Sorry dude tounge.gif

 

-derty

LUCK FOR A BUCK!!!!! f*ck Yea!

 

GTAF's Most Annoying Unbanned Member.

user posted image

bai. -jllr

Link to comment
Share on other sites

You could've read any of the mission coding tutorials as they're probably all mentioning how to add custom threads, but - here's the answer:

Add your custom piece of code at the end of the MAIN segment - just before "Mission 0", that is.

Now to make sure that the script is read by the game, you'll need to add a create_thread command. Search for 004f: until you find quite a lot of 004f lines right after another (quite at the beginning of the script).

Add your 004f line '004F: create_thread @tele' at the end or somewhere in between the other instances of 004F, it doesn't matter.

Link to comment
Share on other sites

Still didn't work.

 

EDIT: Ok it works now, He teleports like i wanted him to. but the pink marker is nowhere to be seen.

ie: I stand in the spot where the pink marker should be and I teleport to where I wanted to go.

Edited by Futurama_Freak1
Link to comment
Share on other sites

If I'm not mistaken you're currently using this line:

 

00FE: actor $player_actor 0 -601.1 1094.7 22.0 radius 1.0 1.0 5.0

 

Let me add the missing parameter description:

 

00FE: actor $player_actor sphere 0 in_sphere -601.1 1094.7 22.0 radius 1.0 1.0 5.0

 

Simply change the second parameter - sphere - from 0 to 1 to make the sphere appear.

 

(The pseudo-code by spaceeinstein and ceedj has the parameters ordered differently, with the 'sphere' parameter at the very end of the line.)

 

Link to comment
Share on other sites

 

(The pseudo-code by spaceeinstein and ceedj has the parameters ordered differently, with the 'sphere' parameter at the very end of the line.)

No, ordered CORRECTLY; this is how it's done in the game. The "old" ordering was done by Barton way back, when reordering opcode parameters was somehow vogue.

Link to comment
Share on other sites

I know, I just wanted him to take notice of the difference since he's coding for VC while you two have shown him an order that applies (solely) to SA* (as far as I'm aware).

 

 

*as long as you're using the original INIs included with SB.

Link to comment
Share on other sites

blush.gif Sorry, didn't mean for that to come out as nearly as harsh as it did.

 

And no, the old order was in SA MB 0.33 too, obviously. tounge.gif

 

I'd better stop; someone's liable to hit me with a brick or ten.

Link to comment
Share on other sites

For the fades in\out look here (your code with changes).

 

:telewait 0if00FE: actor $player_actor sphere 1 -601.1 1094.7 22.0 radius 1.0 1.0 5.0jf @tele00A1: put_actor $player_actor at -614.8 -95.3 22.0016A: fade 1 1000 mswait 1000016A: fade 0 1000 msjump @tele

 

Edited by Wesser
Link to comment
Share on other sites

As I told neten in the other thread, try to follow what the code does. If you had done this you would've easily recognized why the screen is fading AFTER the teleport took place:

It's because all the code that handles the fading has been put BEHIND opcode 00A1 which is responsible for teleporting. And your screen stays black because 'fade 1' means 'fade in' while 'fade 0' means 'fade out' - the lines in your code should be the other way around.

Here's your code, containing all the necessary checks:

 

 

:telewait 0if0256:   player $player_char definedjf @teleif00FE: actor $player_actor sphere 1 in_sphere -601.1 1094.7 22.0 radius 1.0 1.0 5.0jf @tele01B4: set_player $player_char controllable 0 (off) ;; you don't want him to be able to run around while teleporting016A: fade 0 (out) 1000 mswait 1000if0256:   player $player_char defined  ;; still alive?jf @tele0055: put_player $player_char at -614.8 -95.3 22.002EB: restore_camera_with_jumpcut016A: fade 1 (in) 1000 ms01B4: set_player $player_char controllable 1 (on)    wait 1000jump @tele

 

 

This should work.

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