Can Imagepoint name be variable?

Get help using Construct 2

Post » Fri Feb 08, 2013 10:55 pm

Hi guys

I have an object with several Imagepoints and I am trying to express the imagepoint name with an variable. It doesn't seems to work.

So is it possible to set the imagepoint like this:

Set position to Object.ImagePointX("Variable"), Object.ImagePointY("Variable")

Thanks in advance guys

B
2
Posts: 18
Reputation: 286

Post » Fri Feb 08, 2013 11:39 pm

yes You can do that.

if it's instance variable
Set position to Object.ImagePointX(Object.variable), Object.ImagePointY(object.Variable)

or global variable
Set position to Object.ImagePointX(variable), Object.ImagePointY(Variable)
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Fri Feb 08, 2013 11:56 pm

sadly with global variable didnt worked...
Ill try with instance

Thanks alot
B
2
Posts: 18
Reputation: 286

Post » Sat Feb 09, 2013 12:34 am



Sprite have image point called "point"
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sat Feb 09, 2013 1:50 am

You are right.
I did the samo example and it works, even when variable is number.
Still doesnt work in my project tho. Anyways at least i know its something else.

Thanks for the help m8t
cheers
B
2
Posts: 18
Reputation: 286


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests