Discuss Scratch

ShadowGames360
Scratcher
4 posts

Undertale Walking Engine

So I've been working on making an Undertale walking engine. You can go on my profile and look at them. Basically my problem is with version 2.0. 2.0 has me attempting to make scrolling but the problem is that I can only make one thing scroll. I tried using variables but Frisk would always get stuck in the wall. PLS HALP!!!
MathlyCat
Scratcher
1000+ posts

Undertale Walking Engine

Wait, what exactly do you need help with; I'm confused. Your project seems to work fine; I do like it!
scrooge100
Scratcher
1000+ posts

Undertale Walking Engine

I don't see a problem
ShadowGames360
Scratcher
4 posts

Undertale Walking Engine

Problem is that If I try to add something like a npc when I collide with it the other objects keep moving. In my project its the surroundings that move, not the player. So basically the program goes a little like this.
when green flag clicked
forever

if <key [ right arrow] pressed?> then
change x by (-2)
if <<<key [ right arrow] pressed?> and <<touching [Player] ?> >>> then
change x by (2)
end
end
end
This is for the wall. Now when I try to put this program into another sprite such as a npc, when I collide with them the wall still moves while the npc doesn't. I also tried to make a program with variables which looked like this.
when green flag clicked
forever

if <key [ right arrow] pressed?> then
change x by (-2)
if <<<key [ right arrow] pressed?> and <<touching [Player] ?> >>> then
change x by (2)
end
end
end

when green flag clicked
forever
set x to (x)
set y to (y)
end
It worked well but the player kept getting stuck in the wall.

MathlyCat
Scratcher
1000+ posts

Undertale Walking Engine

^^

Try the variables and I'll see what happens when he keeps colliding with walls; the game you're making (background scroll) it's best to use variables.
ShadowGames360
Scratcher
4 posts

Undertale Walking Engine

Ok I did it!
MathlyCat
Scratcher
1000+ posts

Undertale Walking Engine

ShadowGames360 wrote:

Ok I did it!
That's an easy fix! Spawn the character away from the wall
ShadowGames360
Scratcher
4 posts

Undertale Walking Engine

MathlyCat wrote:

ShadowGames360 wrote:

Ok I did it!
That's an easy fix! Spawn the character away from the wall
Oops! I forgot to start the x and y variables at 0. Now check it.

Powered by DjangoBB