Set height/width as a scale% value instead of pxl?

Get help using Construct 2

Post » Tue Jun 26, 2012 5:16 pm

I am trying to set up my platformer character to crouch ("When Down arrow is down, Set height to X" on the Player object). But it seems to want a pixel value when what be more flexible is a % value, the way scale works.

I did a search and found references to OriginalHeight parameters in Construct Classic but I didn't have any success using them in Construct 2, though it's possible I didn't get the syntax right.

Is there a way set height and wight by percentage and if so, how do I do it? And if it is an unlisted parameter (like OriginalHeight) is there a comprehensive list of these commands somewhere?

Posts: 20
Reputation: 1,015

Post » Tue Jun 26, 2012 5:28 pm

player.ImageHeight and player.ImageWidth (assuming the player size = the image size)

The expressions are all in the manual:

Sprite expressions:

Common expressions: 17:30:44
Posts: 1,520
Reputation: 25,780

Post » Wed Jun 27, 2012 6:05 am

That did the trick! And thanks for the links. I forgot that the Player object was also a sprite so I wasn't thinking of the Image related commands.

Posts: 20
Reputation: 1,015

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 5 guests