Discuss Scratch

smallsoldier99
Scratcher
10 posts

how to make character teleport to another characters y axis

i tried my best on this project, please help optimize/fix it https://scratch.mit.edu/projects/247740085/

Last edited by smallsoldier99 (Sept. 23, 2018 03:51:08)

space_elephant
Scratcher
500+ posts

how to make character teleport to another characters y axis

I don't under stand most of your post but to teleport to another sprite's Y
set y to([y position v]of[sprite v])//instantly
//or
glide(1)secs to x:(x position)y:([y position v]of[sprite v])

red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
smallsoldier99
Scratcher
10 posts

how to make character teleport to another characters y axis

like how do i make the sprite go to the nearest point on the y axis where they will intersect/ touch eachother
deck26
Scratcher
1000+ posts

how to make character teleport to another characters y axis

Is the other sprite on the y-axis? It's a bit unclear what you want - it sounds like you'd need to first of all go to the y-axis (x=0) without changing y. Then work out whether the other sprite is above or below and move up or down in a custom block until you touch the other spite. Is that sounding close to what you want?
smallsoldier99
Scratcher
10 posts

how to make character teleport to another characters y axis

i'm trying to get the character to always be above a dark green line at any point, but i want it to be instant https://scratch.mit.edu/projects/247740085/, so for example, i was thinking i could acheive this by making a second hidden sprite go up if it was below the line, down if it was above the line, and update the coords of the character if it was touching the line, but i would need the character to go up about 50 steps, then i have about 8 sprites moving up and down the screen at different speeds, but this is not very efficient, didn't work well, and caused lag on my already slow computer.
titanicman200
Scratcher
100+ posts

how to make character teleport to another characters y axis

The project does not seem to be shared, I cannot access it

My latest projects have centered around natural looking landscapes… Fear me and my colorful grids!
smallsoldier99
Scratcher
10 posts

how to make character teleport to another characters y axis

try https://scratch.mit.edu/projects/247740085/#player

Last edited by smallsoldier99 (Sept. 26, 2018 04:11:28)

deck26
Scratcher
1000+ posts

how to make character teleport to another characters y axis

It looks to me as if you haven't discovered custom blocks with no screen refresh yet. These run quickly as long as you don't put any wait blocks in or do anything to mean they can't complete in a limited time.

Assuming the ball starts above the line you only have to control the height in a few ways.

- if the ball is in the middle of a bounce you just set the new height to the right value
- if the ball is touching the ground move it up 1 pixel at a time (in a loop) until it is not touching

If you do that in a custom block with no screen refresh it should work.
deck26
Scratcher
1000+ posts

how to make character teleport to another characters y axis

You'd actually be best looking at @griffpatch_tutor's platformer tutorial. Treat the ground as a platform.
smallsoldier99
Scratcher
10 posts

how to make character teleport to another characters y axis

Thanks ill look into that
cs3028581
Scratcher
2 posts

how to make character teleport to another characters y axis

im confused
Wainggan
Scratcher
500+ posts

how to make character teleport to another characters y axis

cs3028581 wrote:

im confused
Well, create your own topic

~ parchii
panda_girl1010
Scratcher
1 post

how to make character teleport to another characters y axis

will I don't know I want to let other people interact with my creations. But I don't know how?
@Panda_girl1010
KevinCreator
Scratcher
45 posts

how to make character teleport to another characters y axis

Witht X and Y axis:

go to x: ([x position v] of [Sprite v]) y: ([y position v] of [Sprite v]) 

With Y axis:

set y to ([y position v] of [Sprite v]) 

Last edited by KevinCreator (Dec. 2, 2020 21:42:25)

amongusforever14
New to Scratch
1 post

how to make character teleport to another characters y axis

WHY CANT I UNDERSTAND THIS CODING
griefercube
Scratcher
500+ posts

how to make character teleport to another characters y axis

Please don’t necropost


sometimes, you just have to change a way of thinking to solve a problem. -griefercube
|other projectshow I made the banneranimated thumbnails?i’m on wiki!Cubey Mines|

Last edited by griefercube (32th Undecimber, XXXX)


https://turbowarp.org/563693837/editor (something i did a while back don’t worry it’s for the banner)

list of working bbcodes:

[color=]
[scratchblocks]
[url=]
[img]
[center]
[code]
[code=]
[list]
[quote]
[b]
[i]
[u]
[s]
[big]
[small]
[p]
[wiki]
[google]

Powered by DjangoBB