Thumbstick-template (with capx)

Get help using Construct 2

Post » Wed Feb 05, 2014 7:51 am

Updated the first post to include the link to the capx.
Won't have time to improve upon and or split it up for the different behaviours, I hope some people will appreciate the effort.

Edit (adding the names of people who showed interest):
@Pixel perfick
@AllanR
@Boony
@jayderyu
@andreyin
@RookieDevLittleStain2014-02-06 10:23:36
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 » Tue Mar 04, 2014 4:13 am

@LittleStain

How would you set player tilt to the bullet behavior controls? I've been trying to get my helicopter sprite to tilt back or forth in the direction of travel, but the closest I've gotten in getting it to tilt in only one direction and it gets stuck there.

System | Copter.Bullet.Angle of Motion = 0 | Copter | Rotate 1 degrees toward 10
System | Copter.Bullet.Angle of Motion = 180 | Copter | Rotate 1 degrees toward -10
System | Copter.Bullet.Speed = 0 | Copter | Rotate 1 degrees toward 0

I don't see that doesn't work. Help, please?
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Wed Mar 05, 2014 8:13 am

@Boony

I'm not sure what you are trying to achieve, so I can't give a straight answer.
But what I do see in your code is that you use = which means it will only rotate if the angle of motion is exactly 0.
Seems to me that isn't what you want, but I can't be sure for I don't see what you are trying to do..
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 » Wed Mar 05, 2014 3:52 pm

@LittleStain

I'm just trying to make a helicopter tilt slightly in the direction of travel. It's a side scrolling rescue game using your bullet behavior controls. So if the helicopter moves forward, it tilts forward and if it moves back, it tilts back. No tilting on up or down movement.

If I can't use exactly 0, how do I express a range of numbers and make it work?
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Wed Mar 05, 2014 4:46 pm

How about greater than or equal to, and less than or equal to instead of =. so <= or >=
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Wed Mar 05, 2014 10:06 pm

@BluePhaze

I'm confused. Since angle of motion is circular, isn't everything greater or lesser than a number?

I tried it with 2 contitions each:

If Copter.Bullet.AngleOfMotion Lesser or equal to 45 and
If Copter.Bullet.AngleOf Motion is Greater or equal to 315 then
Copter Rotate 1 degree toward 10

If Copter.Bullet.AngleOfMotion Lesser or equal to 225 and
If Copter.Bullet.AngleOf Motion is Greater or equal to 135 then
Copter Rotate 1 degree toward -10

If Copter.Bullet.Speed Less than 2 then Copter Rotate 1 degree toward 0

That didn't work though.
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Fri Mar 07, 2014 6:24 pm

@LittleStain
@BluePhaze

Edit: RamPackWobble was able to help me in another thread. If anyone is looking to add tilt functionality to the bullet behavior, please view the thread here:

Thumbstick with tilt

It doesn't have to be used with only a helicopter. Having a character slightly tilt forward when they run might give the impression they are running faster.

Thanks again to @LittleStain for making these amazing thumbstick controls! I've tried so many others and these are my favorites!
Last edited by Boony on Mon Mar 10, 2014 4:30 pm, edited 3 times in total.
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Fri Mar 07, 2014 9:37 pm

@LittleStain

you simply made my day, oh sorry my week, sorry again my month, and you don't even know , then yes let me tell you, haha, thx so much. I was looking for this from last i think 1.5 months. I really want to hug you and show my love and respect at the same time. Thanks for sharing such a gem with us. I will learn so much from that. I will look into it for sure. Thanks so much.
B
96
S
20
G
15
Posts: 198
Reputation: 14,571

Post » Mon Mar 10, 2014 11:36 am

Exactly what I needed!

Thanks!
@StylianosArts
Game studio with a portfolio of 4 Apple Featured games.
B
31
S
7
G
2
Posts: 111
Reputation: 2,422

Post » Tue Mar 11, 2014 9:10 am

Thanks for the compliments guys.. :)
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

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 30 guests