image point positions

Get help using Construct 2

Post » Sat Feb 08, 2014 1:31 pm

Hi all,

I have a problem thats brought my rpg game development to a hault.

I have a character that has a sword attack animation and in those frames of the attack is an "image point" thats postioned at the end of the sword in each frame.

When the user attacks and the attack animation starts to play i have a small sprite box that i use as a collision box for the sword to hit enemies.

The collision box is created when the sword attack animation starts(once only) at the "Image point" at the end of the sword.

As the attack moves throught the various frames the Collision box is supposed to set itself to the "Image point", however the collsion box positions does not tally with the "image points" of each frame. So its causing my sword collisons to be way off.

There is nothing i can see that could cause this.

I'm working on another way to add collisions to my sword attack in the event i cant solve this.I would like to know if anyone could help on this matter and would be much appreciated.LI0NHART2014-02-08 13:33:05
B
14
S
6
G
3
Posts: 83
Reputation: 4,228

Post » Sat Feb 08, 2014 2:01 pm

wouldn't a

if collision box is on screen -set position to player.imagepointx(1), player.imagepointy(1)

do the trick?
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

Post » Sat Feb 08, 2014 2:05 pm

Every tick -> set Collision Box.X to sword.ImagePointX(ImagePoint)should work.


ImageImageImageImage
B
157
S
66
G
41
Posts: 2,597
Reputation: 34,821

Post » Sat Feb 08, 2014 6:05 pm

So setting the collision box position when "sword attack animation is playing" causes the problem?, mmm not sure why. I'll try those 2 options and see if that solves it, thanks guys much appreciated :).
B
14
S
6
G
3
Posts: 83
Reputation: 4,228

Post » Wed Feb 12, 2014 4:22 pm

Still has the same problem, however i've done a work around using a centered sprite and pivot to mimic the sword. still none of the wiser why its does't work my original way. Thanks anyway guys :)LI0NHART2014-02-12 16:23:04
B
14
S
6
G
3
Posts: 83
Reputation: 4,228

Post » Wed Feb 12, 2014 4:23 pm

I assume that when you created the CD you immediately pinned it to the sword?
There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Post » Fri Feb 14, 2014 1:41 pm

The original method i tried i didn't as it was as the animation was playing it was set to the image points so there'd be no need to pin itLI0NHART2014-02-14 13:46:30
B
14
S
6
G
3
Posts: 83
Reputation: 4,228


Return to How do I....?

Who is online

Users browsing this forum: eochranek, JaredX, R0J0hound, Unconnected, Yahoo [Bot] and 17 guests