Set position of new Sprite from position of existing?

Just started using Construct 2? Post your questions here

Post » Tue Aug 18, 2015 4:12 am

I'm trying to create a scrolling background, but I keep getting gaps between the images.

Right now my event looks something like this.

ground X <= 450; System Create Object ground on layer "Obstacles" at (1256, 480)

I would like to be able to get the X position of the "old" sprite and the use that sprite's X position + width to set the X position of this new sprite, but I'm not sure how I can do this in Construct?
Posts: 18
Reputation: 261

Post » Tue Aug 18, 2015 9:39 am

If your ground has the origin at the top left:

Ground x < 450
System trigger once
> System Create Object ground on layer "Obstacles" at X = Ground.x+Ground.width ; y = Ground.y
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
Posts: 6,160
Reputation: 19,775

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests