[Suggestion] Rotary knob control plug in

Post your work in progress addons and get feedback

Post » Tue Feb 26, 2013 4:34 pm

Hi to all
Just a plug-in suggestion that could be useful to many.
Imagine a rotary knob like the ones on a guitar amp.
Behavior will allow it to turn using mouse or touch. It may have the following options :
- modulation range (1 to 100, -20 to 20)
- rotating range (1 to 360, -45 to 45)
- variable attached

What do you think ? More suggestions to that idea ?
B
21
S
9
G
4
Posts: 197
Reputation: 4,105

Post » Fri Mar 01, 2013 10:01 pm

I guess it would be a neat thing to have, but couldn't you just make that yourself with a sprite and some variables? Still, I would not call this a bad idea.
B
3
Posts: 8
Reputation: 291

Post » Sat Mar 02, 2013 2:52 pm

@ LMingy : Inded, that could be but I'm not good enough at programming. I you have an idea about how to do it, I'll be glad to hear about it.
BTW, I'm sure that multiplying behaviors for basics taks like that would let more people use Construct 2, I mean people like me who have a very poor knowledge about programmation langages.
B
21
S
9
G
4
Posts: 197
Reputation: 4,105

Post » Sat Mar 02, 2013 8:34 pm

It would be something like this.

1:
Sprite variable (knob)= greater than 0 but less or equal to 360.
Set angle to sprite.knob

2:
Sprite variable (set) = 1 & mousedown
Set Sprite.knob to distance(mouse.X,mouse.Y,Sprite.X,Sprite.Y)
(Devide this by an x amount if the result is to high)

3:
Mouse left click on sprite.
Add 1 to sprite.set

4:
Then for resetting the sprite when unused.
On left mouse button released.
Set sprite.set to 0

U have to test it of course but this is how i would handle it.

Kind regards.
Savvy001Savvy0012013-03-02 20:36:46
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Sat Mar 02, 2013 10:04 pm

Looks nice, Savvy, thanks.
But a behavior would make the job even easier :)
B
21
S
9
G
4
Posts: 197
Reputation: 4,105

Post » Sun Mar 03, 2013 12:01 am

Of course.

Personaly i to would like to see a behaviour for this.

Kind Regards.
Savvy001Savvy0012013-03-03 00:01:54
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Sun Mar 03, 2013 12:35 am

Um you do realize we have anglelerp(a,b,t) right?
Image Image
B
161
S
48
G
90
Posts: 7,354
Reputation: 66,763

Post » Sun Mar 03, 2013 11:17 am

Oh ? No, haven't spoted it yet.
B
21
S
9
G
4
Posts: 197
Reputation: 4,105


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests