How do I set position to an animation point?

Get help using Construct 2

Post » Wed Feb 15, 2017 10:40 pm

I have multiple animations with image points set. I've noticed that it will only pick the first animation in the animation list. I've tried naming them also, but this does not seem to sort the issue. The animation I want is like 3 rows down from the top of the list. Can I do some thing like AnimationName.ImagePointName? I tried, but it wouldn't work.
B
13
S
7
G
2
Posts: 65
Reputation: 2,307

Post » Thu Feb 16, 2017 3:38 am

You need to set the sprite to the animation you want first and then set position to image point by number.

If you have 3 animations for a sprite and you want the third animation and the frame with image point 6:

Set animation Sprite to Third
Set position to image point 6

That animation has to be playing before you can select that image point.

If you change animations such as moving the player then you need to set that same image point in all animations where you want whatever you are attaching to it to be placed.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540

Post » Thu Feb 16, 2017 12:16 pm

Ah, thanks for explaining, I just couldn't think, though it is basically what I have been doing for changing animations for different movement. Just did not think it was the same for setting position, I was over thinking it xD
B
13
S
7
G
2
Posts: 65
Reputation: 2,307

Post » Sun Feb 26, 2017 2:40 pm

I've got my problems with image points too... I have several anmiations for an object and per anmiation different image points from where to spawn bullets from.. Accessing them via number works fine, but via name fails.. at least it seems to take a different image point than the one I want to access.. Everything works fine if there's only one animation though..

Any ideas why accessing the image points via name fails when there are animations? (The animations are set BEFORE I try to access the image points)..
B
13
S
6
Posts: 26
Reputation: 1,086

Post » Sun Feb 26, 2017 3:39 pm

UncleHo74 wrote:I've got my problems with image points too... I have several anmiations for an object and per anmiation different image points from where to spawn bullets from.. Accessing them via number works fine, but via name fails.. at least it seems to take a different image point than the one I want to access.. Everything works fine if there's only one animation though..

Any ideas why accessing the image points via name fails when there are animations? (The animations are set BEFORE I try to access the image points)..


It is probably a result of the speed at which the animation is being played. By the time you see the sprite attached to the image of a frame it has already moved to the next frame and so on.

If that is the case using the Pin behavior is a better choice as it will stay where it is supposed regardless of animation.

If you need something moving attached to an image point you will need to slow down the frame speed to see it.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540

Post » Sun Feb 26, 2017 6:37 pm

lamar wrote:
UncleHo74 wrote:I've got my problems with image points too... I have several anmiations for an object and per anmiation different image points from where to spawn bullets from.. Accessing them via number works fine, but via name fails.. at least it seems to take a different image point than the one I want to access.. Everything works fine if there's only one animation though..

Any ideas why accessing the image points via name fails when there are animations? (The animations are set BEFORE I try to access the image points)..


It is probably a result of the speed at which the animation is being played. By the time you see the sprite attached to the image of a frame it has already moved to the next frame and so on.

If that is the case using the Pin behavior is a better choice as it will stay where it is supposed regardless of animation.

If you need something moving attached to an image point you will need to slow down the frame speed to see it.


Unlikely.. 1st, there's nothing attached there, just something spawned from the image point.. and the animation is still no "real" animation, just one frame (because not finished yet, just a placeholder).
B
13
S
6
Posts: 26
Reputation: 1,086

Post » Sun Feb 26, 2017 7:06 pm

UncleHo74 wrote:
lamar wrote:
UncleHo74 wrote:I've got my problems with image points too... I have several anmiations for an object and per anmiation different image points from where to spawn bullets from.. Accessing them via number works fine, but via name fails.. at least it seems to take a different image point than the one I want to access.. Everything works fine if there's only one animation though..

Any ideas why accessing the image points via name fails when there are animations? (The animations are set BEFORE I try to access the image points)..


It is probably a result of the speed at which the animation is being played. By the time you see the sprite attached to the image of a frame it has already moved to the next frame and so on.

If that is the case using the Pin behavior is a better choice as it will stay where it is supposed regardless of animation.

If you need something moving attached to an image point you will need to slow down the frame speed to see it.


Unlikely.. 1st, there's nothing attached there, just something spawned from the image point.. and the animation is still no "real" animation, just one frame (because not finished yet, just a placeholder).


Doesn't matter if it is a blank sprite or not. The animation speed with changing image points will make that difficult to see.

You " I have several anmiations for an object and per anmiation different image points from where to spawn bullets from"

I was just going off what you said.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540

Post » Sun Feb 26, 2017 7:10 pm

It's not blank.. the animation is just a frame, not several frames, but a sprite is there.

And it works flawlessy as soon as I start to reference the image points via their numbers, not their names..
B
13
S
6
Posts: 26
Reputation: 1,086


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], JarkeyBacon and 4 guests