How do I change size of pin images

Get help using Construct 2

Post » Mon Jul 15, 2013 6:23 am

Hello...

I'm developing a platform game (Based on the tutorial: https://www.scirra.com/tutorials/243/building-a-platform-game-a-beginners-guide?action=lastpage&t=1373865650769#lastcomment) , and I am using an object for the character animations and another object as a rectangle sprite as the manual suggests. I pin the two objects and the idea is that when the down 'key' is pressed the character down on his knees (the image is smaller than when he is standing)... my question is how can I do to put the animations (object) on the bottom instead of the top, or how can I resize the invisible sprite to the same size of the animations size and what event is the indicated to put the action ?...

thanks.
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Mon Jul 15, 2013 7:54 am

in your events when the button to kneel is pressed, use the playerbox.height and playerbox.width events to change it. In my case the invisible sprite is called player box, you also have set size and set scale so between all those you should have what you need. Here is a screenshot of the options:

B
49
S
12
G
10
Posts: 1,833
Reputation: 14,538

Post » Mon Jul 15, 2013 8:45 pm

Wow!, thanks for your help. I didn't see it that way, but what you say makes sense, I tried it and it works!.

Thanks for sharing your tutorial too. Now I'm having another problem (I haven't read your tutorial) but when I pressed down and play the animation of character kneel, it stuck in a loop. I mean I press down, he kneel, and then the animation start over again until I released the down key. I set the properties of the kneel animation this way:

Speed: 18
Loop: No
Repeat count: 1
Repeat to: 6
Ping-pong: No


I would like you to help me testing my game as soon as I have one prototype off course if you want.

And again, really thanks man!alejovilla2272013-07-17 06:02:52
B
21
S
3
G
2
Posts: 86
Reputation: 2,262


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], matrixreal, mercuryus, thatserafimkid and 5 guests