Discuss Scratch

Tookiekat_studios
Scratcher
38 posts

map transfering

ok, im making a game where there is more than one map. and i wanted to know how would you make a map transferring system. for example, you're player walks to the box where the map transer would accure. simular to the rpg maker series. if you need the players script here it is:
when [ space] key pressed
point towards [ mouse pointer]
move (10) steps
point towards [ mouse pointer]
move (10) steps

Last edited by Tookiekat_studios (Nov. 24, 2017 20:44:10)

StrangeMagic32
Scratcher
1000+ posts

map transfering

What shape is the mini-map?
What size is the mini-map?
What is the X and Y dimensions of the world that the mini-map will be representing?


“Remember the worth of souls is great in the sight of God;”
- Doctrine and Covenants 18:10


I have since moved to @JollyWinter
ggenije
Scratcher
500+ posts

map transfering

First imagine that every map has it's number(ID)
so you for example have maps

1,2,3,4,5

and you want t from map get to other side

so you'll need variable
(currentMap)

and to check next map be like


for player script
if <(currentMap) = [1]> then


if < (x position)< [-235]> then
set [currentMap v] to [2]
broadcast [changeMap v]

end
if < (x position)> [235]> then
set [currentMap v] to [3]
broadcast [changeMap v]

end
end

and for Stage script

when I receive [changeMap v]
if <(currentMap )= [1]> then
switch costume to [background1 v]
end
if <(currentMap )= [2]> then
switch costume to [background2 v]
end
if <(currentMap )= [3]> then
switch costume to [background3 v]
end

or for any object



when I receive [changeMap v]
if <(currentMap )= [1]> then
show
end
if <(currentMap )= [2]> then
hide
end
if <(currentMap )= [3]> then
hide
end

I hope this will help you
StrangeMagic32
Scratcher
1000+ posts

map transfering

ggenije wrote:

First imagine that every map has it's number(ID)
so you for example have maps

1,2,3,4,5

and you want t from map get to other side

so you'll need variable
(currentMap)

and to check next map be like


for player script
if <(currentMap) = [1]> then


if < (x position)< [-235]> then
set [currentMap v] to [2]
broadcast [changeMap v]

end
if < (x position)> [235]> then
set [currentMap v] to [3]
broadcast [changeMap v]

end
end

and for Stage script

when I receive [changeMap v]
if <(currentMap )= [1]> then
switch costume to [background1 v]
end
if <(currentMap )= [2]> then
switch costume to [background2 v]
end
if <(currentMap )= [3]> then
switch costume to [background3 v]
end

or for any object



when I receive [changeMap v]
if <(currentMap )= [1]> then
show
end
if <(currentMap )= [2]> then
hide
end
if <(currentMap )= [3]> then
hide
end

I hope this will help you
I'll bet you did better than me XD
Good job!


“Remember the worth of souls is great in the sight of God;”
- Doctrine and Covenants 18:10


I have since moved to @JollyWinter
Tookiekat_studios
Scratcher
38 posts

map transfering

StrangeMagic32 wrote:

What shape is the mini-map?
What size is the mini-map?
What is the X and Y dimensions of the world that the mini-map will be representing?
there isnt a mini-map, but thats a cool idea for the game!
Tookiekat_studios
Scratcher
38 posts

map transfering

ggenije wrote:

First imagine that every map has it's number(ID)
so you for example have maps

1,2,3,4,5

and you want t from map get to other side

so you'll need variable
(currentMap)

and to check next map be like


for player script
if <(currentMap) = [1]> then


if < (x position)< [-235]> then
set [currentMap v] to [2]
broadcast [changeMap v]

end
if < (x position)> [235]> then
set [currentMap v] to [3]
broadcast [changeMap v]

end
end

and for Stage script

when I receive [changeMap v]
if <(currentMap )= [1]> then
switch costume to [background1 v]
end
if <(currentMap )= [2]> then
switch costume to [background2 v]
end
if <(currentMap )= [3]> then
switch costume to [background3 v]
end

or for any object



when I receive [changeMap v]
if <(currentMap )= [1]> then
show
end
if <(currentMap )= [2]> then
hide
end
if <(currentMap )= [3]> then
hide
end

I hope this will help you

thanks! it was pretty helpful!

Powered by DjangoBB