Creating a control using Knobman

Get help using Construct 2

Post » Tue Jun 18, 2013 12:07 pm

Hi all,
Is it possible to have a draggable rotary control ?
I have been using this to generate sprite sheet for animation.

http://www.g200kg.com/en/software/knobman.html

This would be great for all kinds of healthbars/controls etc.

I am wondering if I can link the mouse x +/- to the animation frames and alter a parameter such as opacity.
It would presumably have to work with on clicked and drag up/down.

Any help would be greatly appreciated.

JKID.

B
6
Posts: 16
Reputation: 307

Post » Tue Jun 18, 2013 12:50 pm

You're essentially recreating the wheel with frames since all graphical objects can be rotated.
Image ImageImage
B
171
S
50
G
180
Posts: 8,397
Reputation: 113,988

Post » Tue Jun 18, 2013 1:45 pm

@newt

Yes your are right, however using Knobman allows for lighting effects etc so that's the reason I would like to get this working rather than rotating a single object.
I suppose it would be possible to link rotation min/max to animation frames to achieve this ?
That must be what your implying no ?

Thanks for your help newt.

JKID.
B
6
Posts: 16
Reputation: 307

Post » Tue Jun 18, 2013 2:15 pm

So do you plan on making 360 frames?
Image ImageImage
B
171
S
50
G
180
Posts: 8,397
Reputation: 113,988

Post » Tue Jun 18, 2013 9:02 pm

Thanks newt

36 would be enough for 360 changing the frame every 10 I guess although in the case of a pot it would go from -145 to 145 degrees.

It would be 29 frames I think.
How would one go about setting this up ?
I suppose you could increment the frames on a percent basis ?

I am wondering if this might be a good behavior preset.

JKID.
B
6
Posts: 16
Reputation: 307

Post » Tue Jun 18, 2013 9:23 pm

I'd also seriously recommend against using set frames. Why go through all that hassle for a bit of trickery?

Using rotation towards a dummy object that uses the drag-and-drop behaviour, you can quickly put together a rotating dial as you can see in this example (taken from a metronome app I made a little while ago).

For the directional emboss (which doesn't rotate), I used an object with transparency overlaid on the dial. I think the effect is convincing enough, and I imagine you could extend it to some simple lighting effects.

If you are totally set on the masochistic practice of creating 30-odd frames for your dial, you could create an event to set its animation frame every tick to int(Dial.Angle/10)-1, with the frames loaded up in the correct order and the animation speed set to zero.GeometriX2013-06-18 22:13:19
B
57
S
15
G
11
Posts: 912
Reputation: 12,626


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests