Discuss Scratch

weridocutey21
Scratcher
13 posts

changing a background in a RPG game.

Hello to anyone that is the
I am making a RPG game and I want to know how to change the backdrop when touch a certain edge with a certain backdrop. I don't know how to do this. does anyone know how to do this? or am I saying it to weridly?
Nezon
Scratcher
1000+ posts

changing a background in a RPG game.

make a sprite, make a coustume that is near the edge of what you want, and add this stuff

when green flag clicked // add this to the sprite
set [ghost v] effect to (100)

when green flag clicked // add this to toucher sprite
forever
if <touching [edge sprite v] ?> then
switch backdrop to [ v]
wait (0.1) secs
end
end

Last edited by Nezon (Nov. 2, 2020 01:11:32)

weridocutey21
Scratcher
13 posts

changing a background in a RPG game.

hello Nezon
do you know how to make the backdrop change into a different backdrop depending on the backdrop it is?

Like for example if the backdrop was backdrop 1 and you touched the left edge sprite it would change to backdrop 2 but if you touch the same sprite in backdrop 2 it would change into backdrop 3?
r3xCS
Scratcher
100+ posts

changing a background in a RPG game.

weridocutey21 wrote:

hello Nezon
do you know how to make the backdrop change into a different backdrop depending on the backdrop it is?

Like for example if the backdrop was backdrop 1 and you touched the left edge sprite it would change to backdrop 2 but if you touch the same sprite in backdrop 2 it would change into backdrop 3?
simple.

if <(backdrop #) = [1]> then 
switch backdrop to [backdrop 2]


else
if <(backdrop #) = [2]> then
switch backdrop to [backdrop 3]


else
if <(backdrop #) = [3]> then
switch backdrop to [backdrop 4]

end
end
end

add this to the script nezon gave.

Last edited by r3xCS (Nov. 2, 2020 05:33:44)

weridocutey21
Scratcher
13 posts

changing a background in a RPG game.

Thanks!

Powered by DjangoBB