How do I change an image point via event

Get help using Construct 2

Post » Tue Jan 19, 2016 12:31 pm

Hi , how can i do to change an image point via "Event.
The goal is the usage of a Sine Size effect that i would like to occured from the middle of my sprite ( my current default origin start at upper left and i don't want to change that)
Thanks
B
3
Posts: 6
Reputation: 187

Post » Fri Jan 22, 2016 6:36 pm

I don't think you can (to my knowledge).
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Mon Jan 25, 2016 8:29 am

Thanks for reply
B
3
Posts: 6
Reputation: 187

Post » Mon Jan 25, 2016 3:15 pm

Perhaps you can cheat this.

By pinning the sprite object at a certain point to another object, whose pivot point is in a different place relative to the first object's pivot point.
Check out "Extraordinary!" the Superhero Card Game: www.armchairadventuring.com
B
14
S
2
Posts: 35
Reputation: 1,323

Post » Tue Jan 26, 2016 8:31 am

DigiLusionist wrote:Perhaps you can cheat this.

By pinning the sprite object at a certain point to another object, whose pivot point is in a different place relative to the first object's pivot point.


I will try that.
Thanks
B
3
Posts: 6
Reputation: 187

Post » Tue Jan 26, 2016 11:14 am

DigiLusionist wrote:Perhaps you can cheat this.

By pinning the sprite object at a certain point to another object, whose pivot point is in a different place relative to the first object's pivot point.


Seconded, you can also compute an absolute position using your sprite's local coordinates using a little bit of math.
ImageImage
B
42
S
13
G
10
Posts: 164
Reputation: 7,625

Post » Tue Jan 26, 2016 11:37 am

The origin is the position from which all caculations regarding the object are done..
Scaling, rotating,movement..
Even if the image representing your object is not even near the origin, Construct will see the origin as the position your object is and all actions regarding the object will take this as a starting point..

If you want your object to scale from and to the center by actions, the origin should be at the center of your object..
If for any other actions (rotation,movement) the origin should be somewhere else, using a "dummy" sprite to pin to, as described above would be a fairly simple working solution..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: rayolf and 16 guests