Changing Animations

Get help using Construct 2

Post » Tue Jun 26, 2012 5:06 pm

No, not yet. I've searched around and found references to a OriginalHeight and OriginalWidth parameter in Construct Classes but I haven't been able to get that to work on Construct 2. Quite possibly a syntax error but if anyone knows, I'd love to hear.
B
5
Posts: 20
Reputation: 1,015

Post » Tue Jun 26, 2012 7:50 pm

What do you think the advantage would be doing it the way you propose? Speed?
B
30
S
5
G
4
Posts: 26
Reputation: 5,247

Post » Thu Jul 05, 2012 4:46 pm

"To prevent the player standing up inside a wall do something like:

If the player is crawling and down is not pressed then
   change the player size to (39,126)
   if the player is not overlapping wall at offset 0,-1 then
      stand up... set animations etc..
   else
      set size back to (39,126) + stay crouching"

After spending many hours breaking my capx, I haven't been able to get this to work either.
B
30
S
5
G
4
Posts: 26
Reputation: 5,247

Post » Fri Jul 06, 2012 12:05 pm

[QUOTE=switchblade327]I've searched around a bit but haven't been able to find an expression to set height or width to a percentage of their original. Any takers?[/QUOTE]

I believe the only way it's to use a math formula.
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Fri Jul 06, 2012 3:45 pm

You can download the sandBOX and learn how I solved this issue =]

Plus, there have a lot of other poses. Feel free to use, it's not paid.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Fri Jul 06, 2012 3:48 pm

[QUOTE=ageiser] "To prevent the player standing up inside a wall do something like:

If the player is crawling and down is not pressed then
   change the player size to (39,126)
   if the player is not overlapping wall at offset 0,-1 then
      stand up... set animations etc..
   else
      set size back to (39,126) + stay crouching"

After spending many hours breaking my capx, I haven't been able to get this to work either. [/QUOTE]
It was kinda tricky. You have to make sure the player can't jump while crouching, crouch while flying, fly while crawling, etc etc...
I think this covers everything:
animationTest3.capx
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Fri Jul 06, 2012 6:49 pm

Wow! Thanks.

I didn't think to separate the animations from the player object size. Also, thanks for the heads up on instance variables. I tried doing something similar (vaguely) with global variables, but it never worked.
B
30
S
5
G
4
Posts: 26
Reputation: 5,247

Post » Mon Jul 09, 2012 2:47 pm

[QUOTE=VampyricalCurse] [QUOTE=switchblade327]I've searched around a bit but haven't been able to find an expression to set height or width to a percentage of their original. Any takers?[/QUOTE]

I believe the only way it's to use a math formula.[/QUOTE]

Dividing by 100 will give you 1% of the original value, multiplying that value by say 50, will give you 50% of the original value.
B
16
S
6
G
6
Posts: 100
Reputation: 4,840

Post » Mon Jul 09, 2012 5:47 pm

tl;dr all answers.

Did you fix the Crawl and Stuck walking bug?
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue Jul 10, 2012 12:50 pm

Yes. The animation now works as I intended.

See Ramones' post from July 6, 2012 - 3:48 pm for the capx.
B
30
S
5
G
4
Posts: 26
Reputation: 5,247

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: emoticon, makkancs and 25 guests