Platform Builder Forums
Main => Suggestions => Topic started by: CGM on January 21, 2020, 07:48:20 PM
-
player 1 x+1 = enemy 12
What is this doing? It is moving the player 1 pixel closer to the enemy on the X position. This would be super cool for some things.
-
Oh, and I really would like to see this in a patch, TingThing!
-
player 1 x+1 = enemy 12
What is this doing? It is moving the player 1 pixel closer to the enemy on the X position. This would be super cool for some things.
Couldn't you use something like:
if player 1 x < [enemy 12 x]
{
player 1 x += 1
}
else
{
player 1 x -= 1
}
-
You are BRILLIANT WARRIOR! I NEVER thought of that!
-
You are BRILLIANT WARRIOR! I NEVER thought of that!
It's something obvious
player 1 x+1 = enemy 12
What is this doing? It is moving the player 1 pixel closer to the enemy on the X position. This would be super cool for some things.
Cool idea but it's not the manner I think.
-
Well, apparently I've been put in my place, I'd never thought of that!
-
I've spent LOTS of time trying to get this idea to work for both X and Y coordinates. And it WILL NOT WORK. :/
-
I really want this.
-
I've spent LOTS of time trying to get this idea to work for both X and Y coordinates. And it WILL NOT WORK. :/
Can you be more specific as to what is not working ?
I can get it working with the code I'd given you.
For both X and Y co-ordinates you can use something like
if player 1 x < [enemy 12 x]
{
player 1 x += 1
}
else
{
player 1 x -= 1
}
if player 1 y < [enemy 12 y]
{
player 1 y += 1
}
else
{
player 1 y -= 1
}