positioning sprites

For questions about using Classic.

Post » Sat Sep 03, 2011 3:02 pm

Steven,

Thanks a lot for the cap.
Your 1st cap's method is what I use to find out the x/y offset and hardcode this for the menu.

Your 2nd cap is something I can use for general purposes. Thanks again!

About your 2nd cap: you used the function "clamp".
I have never seen or heard of this before.
I could I have known how to use this?rogerty2011-09-03 15:50:05
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Sat Sep 03, 2011 7:51 pm

With offsets you will become more adept at figuring it out on the fly, placing an object, running to see if it is in the right place, adjusting etc. The debug menu also has a sprites position relative to 0,0 which might help you also. Grab the Tiledbackground texture from the cap, and place it down on your background, each square is 32x32 so you will have a good idea where you are at right away.

Clamp is awesome, it really simplified a lot things for me. Quazi or his brother introduced clamp to me somewhere a long the way, and once you find it, you will find a lot of places to use it.

Clamp(a, b, c)

a is where the value changes. b is where the bottom limit of the change to value a, c is the upper limit of the change to value a.
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Tue Sep 06, 2011 10:20 am

Thanks for the explanation of clamp. I hope the wiki (of CC and C2) will get more extensive.
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests