Question about image point

For questions about using Classic.

Post » Wed Dec 22, 2010 12:50 pm

Hi all!
I'm trying to custom my "ghost shooter" game from the tutorial.
Instead of repeatly click the mouse button to shoot, i've done this :



Then I just have to keep the mouse button down to make my character shoot.

The bullet is supposed to appear to the character image point "canon", but when I press the mouse button, only the first bullet appears to this point.
The other ones appear on the center of the character sprite instead of its image point "canon".

Does someone could help me about this?

Thank you very much.
B
12
S
7
G
7
Posts: 446
Reputation: 4,268

Post » Wed Dec 22, 2010 2:33 pm

[quote="Coin-coin le Canapin":h6qnxrg1]Hi all!
I'm trying to custom my "ghost shooter" game from the tutorial.
Instead of repeatly click the mouse button to shoot, i've done this :



Then I just have to keep the mouse button down to make my character shoot.

The bullet is supposed to appear to the character image point "canon", but when I press the mouse button, only the first bullet appears to this point.
The other ones appear on the center of the character sprite instead of its image point "canon".

Does someone could help me about this?

Thank you very much.[/quote:h6qnxrg1]

My guess is, you've got the "canon" image point set for the first frame of your "shooting" animation, but not for the subsequent frames.

From the layout editor, double click on your mainCharacter sprite to load it up in the picture editor. You should see all the available frames for this sprite along the bottom there. Cycle through them and check to see if your image points are in the right place on every frame.
B
4
S
1
G
2
Posts: 64
Reputation: 980

Post » Wed Dec 22, 2010 3:09 pm

That was right, thanks a lot!
B
12
S
7
G
7
Posts: 446
Reputation: 4,268

Post » Wed Dec 22, 2010 10:23 pm

Um isn't the code a little redundant?

I mean, you'd get the same results if you said

Left mouse button is down
Every 400 Miliseconds

And make the actions for that the ones for Event 3

And you wouldn't need a private variable.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests