How do I set the ANGLE of a 9-Patch object?

Get help using Construct 2

Post » Tue Mar 05, 2013 11:32 pm

Ok, maybe I'm not using the 9-Patch object correctly, but I'd like to be able to set the angle. There is no "angle" parameter under the "common" properties.

WHY? I just like the look of the boxes better than a scaled/stretched sprite - for all the reasons given in the example of the 9-patch, it just looks better. I'm using (well, was trying to use) them as HUD elements, but need to place them at different angles, not just parallel boxes.

Thanks!

PS: I did try to use the action "Move at Angle" where I set the "move" parameter = 0 and the angle to 45. But that didn't do anything. And that may not be the proper way to express that anyway.

PPS: Is there any hidden "gotcha" stuff with the 9-patch object, like "Oh, it doesn't work in Safari." I'd like to know before I get too far committed to it. Thanks!!
B
8
S
2
G
3
Posts: 71
Reputation: 3,066

Post » Wed Mar 06, 2013 6:34 am

Quick hack off the top of my head, rotate the layer that its on.

Better solution - if you're using a fixed HUD, take a little time and create the sprites sized as you want them. If your design is not finalized, use placeholders.

This won't work if you're constantly resizing HUD elements though.. you may want to make custom events to mimic 9patch behavior. Maybe a 3 patch? For example have a fixed image for the ends of a status bar, and a stretchable sprite in the middle.

Doesn't look like 9patch supports angles. Behaviors don't rotate it either. Any possible future support for this?
Mistakes were made.
B
37
S
17
G
67
Posts: 1,041
Reputation: 38,211

Post » Wed Mar 06, 2013 7:17 pm

Hey thanks @oosyrag.

I had no idea you could rotate layers! I agree it may not be the best solution for this, but good to know - you never know when that might come in handy.

Yes, after I posted this I realized that I should just make a PNG sprite of the HUD in Photoshop and use that - it was just enticing to build it in C2, but this will be better in the long run.

Thanks again for your help!
B
8
S
2
G
3
Posts: 71
Reputation: 3,066


Return to How do I....?

Who is online

Users browsing this forum: NRABrazil, PixelatedTrip and 28 guests