How do grid move effectively and scroll to

Get help using Construct 2

Post » Tue Apr 01, 2014 1:22 pm

I am having a bit of a thick moment here

I have a tilemap set up at 32x 32

when i press the right arrow i am asking my sprite to move x +32

it seems to be jumping +64 pixels and moving along the screen to the right aswell rather than set dead centre

so i press right he moves +32 and the back ground moves another 32 it seems

what i really want to happen is he moves +32 pixels and remains in the centre of the screen, so effectively the map is moving underneath him
B
10
S
2
G
2
Posts: 45
Reputation: 2,039

Post » Tue Apr 01, 2014 2:16 pm

I assume the sprite is the player? if that's the case and you want it to remain in the centre, and only apply the movement to the tilemap.

If player
- press Right
Set position of Tilemap.X = Tilemap.X - 32

- press Left
Set position of Tilemap.X = Tilemap.X + 32
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Tue Apr 01, 2014 2:32 pm

thanks this put me on the right track

Set X to tilemap.x -32 for right


cheers

braindeath hit me hard today
B
10
S
2
G
2
Posts: 45
Reputation: 2,039

Post » Wed Apr 02, 2014 2:25 pm

Sorry to necro this but my scroll to behaviour seems to be moving the map aswell

so my sprite (i have changed the way it moves with custom movement) however the piece moves across the map with the scroll to behaviour but it slowly overtakes the edges or moves faster than the screen scrolls

so as i press right it goes right but the tilemap seems to move aswell so eventually it will go off the screen

it is the only thing with the scroll to behaviour as far as i can see

i have looked at other movements similiar to mine and the player/sprite stays dead centre screen?
B
10
S
2
G
2
Posts: 45
Reputation: 2,039


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 28 guests