Thumbstick-template (with capx)

Get help using Construct 2

Post » Fri Jan 03, 2014 11:46 pm

I tried it out on my iPad with Safari and I'm having the same issues as AllanR. I can shoot, but I can't move. Works great in Chrome for PC.

I like the duel joystick idea and the idea to create the joystick on touch. Might be cool to allow the player to adjust a location of a fixed joystick on the screen and change it's opacity.

Boony2014-01-03 23:46:36
B
14
S
3
G
1
Posts: 87
Reputation: 1,103

Post » Sat Jan 04, 2014 3:58 am

Are you tracking the touch by ForID or are you just judging based with the simple and only OnTouch and OnEnd. If you don't use Touch.ForID to track a direct touching instance you can't effectivly do any gamepad conrtols.

It's why I wrote my tutorial in the first place to overcome the Touch.ForID hurdle.

good fortune though. Mine only covers the principles and more robust CAPX is a good addition :)

If you haven't integreated the ForID multi touch. You can build off of the tut and capx from this tutorial :)
https://www.scirra.com/tutorials/398/touch-stick-controllers
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018

Post » Sat Jan 04, 2014 7:21 am

@Jayderyu,

Ofcourse I'm using touch ForId, that's one of the most important parts, as you well put it. I will look into why this isn't having the desired effect on iPhones.

I will also look into your tutorial to see if it has any new angles on the subject to look into.
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 » Sat Jan 04, 2014 8:19 am

Discovered a small irregularity in the events, which I didn't think would have any influence but changed anyway.

For people with Iphone and Ipad and such please try again to see if the multitouch now works. (You'll probably have t refresh the page a few times, at least I always have to with dropbox)
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 » Sat Jan 04, 2014 3:45 pm

I just tried it again on my iPhone and it does work now. There were a couple times when I just missed the thumbstick and thought that it has locked up or something. It might help if the middle circle of the thumbstick was slightly bigger... other than that it looks great! :)
B
95
S
33
G
20
Posts: 438
Reputation: 17,640

Post » Sat Jan 04, 2014 3:49 pm

Thanks @AllanR

Glad to hear the Iphone works now too. Now I can try to implement some of the suggestions and create the commented capx's for the community.
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 » Sat Jan 04, 2014 6:06 pm

The analog itself works really well, but the movement it sends seems pretty limited (the sprite can only go to 8 directions instead of the whole analog range).

I'm not sure if it's meant to be like that, but you could check the distance of the analog to see how far it is, then translate to the character speed by using distance(spritebase.x,spritebase.y,spriteanalog.x,spriteanalog.y).

And about the direction, you can use angle(spritebase.x,spritebase.y,spriteanalog.x,spriteanalog.y) to have the character sprite also point wherever the analog is at.
B
123
S
43
G
41
Posts: 847
Reputation: 28,206

Post » Sat Jan 04, 2014 6:18 pm

@andreyin,

Have you only checked the 8 direction behaviour? By clicking on the name you get bullet behaviour, car behaviour and platform behaviour examples.
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 » Sat Jan 04, 2014 6:24 pm

@LittleStain

Oh, sorry, my mistake! I checked it now, that's really cool! I'd just change the speed the car turns in the car behavior, but every other one is fine :)
B
123
S
43
G
41
Posts: 847
Reputation: 28,206

Post » Sat Jan 04, 2014 6:43 pm

@andreyin,

Thanks! The intention was to make a analog stick for all built in behaviours, with as many options build in to make it easily adjustable for individual needs.
End-product will probably be this example capx and seperate capx's for every behaviour with a number of options to adapt. All commented ofcourse.

This will take some work still, but the response so far helps me a lot to get the energy to go on..
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: blackhornet, evillair, jorgmaquoi, ultrafop, Yahoo [Bot] and 29 guests