Basic question involving the usage of image points.

For questions about using Classic.

Post » Mon Aug 09, 2010 8:57 pm

I have a sprite, I created some image points and named them. Then, I want another object to stick to one of the image points. How do I refer to the point's coordinates? Tried to do it by clicking the object in the window in the lower part of the screen, but it just doesn't see my image points.
B
1
G
2
Posts: 8
Reputation: 641

Post » Mon Aug 09, 2010 9:27 pm

I have no idea what you mean by clicking the object in the lower part of the screen but

the way that you stick something to it is action
Set Object To Another Object's Position

and there is an option for an imagepoint there, and you either type the number or name of the imagepoint after choosing the object
the way you refer to the coordinates in any case where you can type an expression is

objectname.Imagepointx("imagepointname") (or the number without quotes)
and objectpoint.imagepointy("imagepointname")
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Aug 09, 2010 10:17 pm

I know it. I tried it the way you describe, but I'm not really sure what to type in the brackets. Neither the point's name nor a number work.
B
1
G
2
Posts: 8
Reputation: 641

Post » Mon Aug 09, 2010 10:29 pm

[url:353o0w98]http://dl.dropbox.com/u/1013446/New%20folder%20%284%29/ip.cap[/url:353o0w98]
made with latest version
each always event shows a possible method
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Aug 09, 2010 10:51 pm

Here's another example, with a way that you can use multiple image points:

http://dl.dropbox.com/u/5868916/ImagePoints.cap

Check out the private variables on the individual satellites, and the image points on the orbit object. The strings match, so you can use that with a 'for each' condition to easily set them all to the correct position.

Also be sure not to include quotes around the strings in variable editors for private and global variables, but do use them in any expressions in your actions. Construct is a bit ambiguous there.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests