[SOLVED]How the heck do I do this...?/Control sytem.

Get help using Construct 2

Post » Mon Jul 13, 2015 12:01 pm

Hello World,

So as usual with me, I took something simple and managed to turn it into something super complicated(imo). This time instead of writing 10 pages of text trying to explain what I wanna do(and probably still failing to be 100%clear) I thought I'd just make a video to show/tell you guys what I need help with.
So download the video please from the link below, watch it, and then if you have anymore questions I'd be happy to answer them.

Thank you.

Link: Click Me
Last edited by VIKINGS on Mon Jul 13, 2015 11:12 pm, edited 1 time in total.
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 13, 2015 12:14 pm

Ok so wouldn't changing the "touch is touching" to "touch is touching object arc" do what you want?

There are obviously many other ways to do it..
Using either the clamp()-expression or "is between angles" condition, maybe in combination with the distance() expression..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 12:22 pm

I've never heard of the clamp expression before @LittleStain , sounds interesting, could you make a little example capx with that one so I can see how it is used?

The main problem isn't so much changing the touch event for the rotation. But how do I olso make it so that that little "light" appears under/follows your finger, but only within the confines of the arc?
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 13, 2015 12:32 pm

could be as simple as:

touch is touching arc - light set position to to touch.x,touch.y

on any touch end - light set invisible

A lot of it depends on what you want..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 12:35 pm

I had this example in my dropbox using the clamp:

Clamp mouse cusor
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 12:57 pm

Ok, thank you. I'll play around with those suggestions later in the day(waiting on a pizza right now:D) and if I run into any problems I'll pm you, ok?


LittleStain wrote:I had this example in my dropbox using the clamp:

Clamp mouse cusor


So, I ran the example, I looked at the code, and I still don't get it.... What exactly is clamp suppose to do? Sorry for being dumb.;)
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 13, 2015 1:00 pm

clamp(x, lower, upper)
Return lower if x is less than lower, upper if x is greater than upper, else return x.
clamp(5,2,10)=5
clamp(1,2,10)=2
clamp(12,2,10)=10
If you want x is between 10 and 15, you'll use clamp(x,10,15)
Last edited by MadSpy on Mon Jul 13, 2015 1:03 pm, edited 1 time in total.
Image Image
B
25
S
14
G
136
Posts: 876
Reputation: 71,005

Post » Mon Jul 13, 2015 1:01 pm

If you look at the numbers in the middle of the screen, you'll see the actual mouse.x and mouse.y coordinates and the clamped mouse.x and mouse.y coordinates..
Clamp prevents a value to go above and below specified values..
This example was made to always keep the "cursor" within the play-area..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 1:06 pm

Ahhhh, if I try to go outside the layout, now I get it. Ok, thank you.:P
Yeah @MadSpy, I checked the manual and read that part the second @LittleStain mentioned clamp, and I concluded that that phrase is the most ambiguous/nonexplicative piece of ****** there ever was..... I don't know, I guess my brain just isn't wired that way.... :?
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 13, 2015 11:12 pm

Hehe, I did it guys, yessss!!!:D I still have to create(or find) a decent light sprite, the one I have at the moment is just a stand in, but other then that I have achieved pretty much exactly what I wanted. I didn't even have to use clamp, the blend mode-source atop and adding another layer with force own texture was enough.
You can check how it turned here.

So thank you very much once again @LittleStain , @MadSpy .
B
21
S
11
G
6
Posts: 414
Reputation: 5,335


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 43 guests