Why is my touch control not showing up?

Get help using Construct 2

Post » Thu Apr 18, 2013 12:21 am

[QUOTE=TELLES0808] To include an eventsheet, simple click on the "Add Include" button, inside the Events Menu, on the top left of your screen.[/QUOTE]

I know to reduce memory load/usage, it's wise to dump all objects into an 'object dump' layout.

What about if you have to pin objects to another? Suppose I have the brakes on my spaceship positioned exactly. If I move the spaceship to another layout, how would I 'move' the ship to the current layout without having to repin everything, especially since scaling might mess with the pin positions?
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Thu Apr 18, 2013 12:59 am

just set the X and Y and pin right after it, on an Start of Layout event.

I do everything via code, that BACKUP canvas is only to preview and loading purpose.
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,209
Reputation: 18,357

Post » Thu Apr 18, 2013 1:04 am

[QUOTE=TELLES0808] just set the X and Y and pin right after it, on an Start of Layout event.

I do everything via code, that BACKUP canvas is only to preview and loading purpose.[/QUOTE]

Suppose I have multiple instances of an object. For example, I have four instances of the brakes sprite.

Would I just create that sprite multiple times and then pin it? What if each instance has a different angle?Excal2013-04-18 01:05:59
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Thu Apr 18, 2013 11:40 am

aah lol i missunderstood your problem a bit. but i really DO have the solution to your problem. in my game there are 4joysticks and 4players and they can be used all at the same time so 4 fingers are touching the screen and the every joystick responds to the appropriate touch input.
how i did this:
i made a invisible layer at the top called "subdivision". in that layer i devided the screen into 4 rectangles called "tracker1" ,2,3 and 4.
now i have global variables calld touchID_player1,2,3 and 4 and an event like touch is overlapping tracker1 -> store touchID in variable touchID_player1.
i can send you a capx. as soon as i get on my desktop computer if you want to.
ps: maybie ill make a tutorial on that in near future.philx2013-04-18 11:42:00
B
23
S
6
G
5
Posts: 132
Reputation: 4,487

Post » Thu Apr 18, 2013 11:47 am

philx

I'm doing the same thing, except without the object in order to save memory.

Mine detects whether they've touched the left or right side of the screen:

Touch.X > ViewportRight("TouchInterface")/2 and Touch.X < ViewportRight("TouchInterface")/2

However, I'm having issues when both the left and right are touched at the same time. Namely, the second touch ID reverts back to -1 almost immediately.Excal2013-04-18 11:48:04
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Thu Apr 18, 2013 12:06 pm

mh i have no idea how much memory is used by the invisible sprites. but here's a little preview. test it on a touch device and see that the version with invisible sprites works finde.
https://googledrive.com/host/0B7m-eoWIKsSMeVNlVzBzMTdFanM/index.html
B
23
S
6
G
5
Posts: 132
Reputation: 4,487

Post » Thu Apr 18, 2013 12:34 pm

@philx

Can you share your .capx?
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Thu Apr 18, 2013 3:07 pm

For anyone else who might be able to help, I'm still not able to get both touches working. When the second touch happens, things go wrong.

SpaceGame.capx
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Fri Apr 19, 2013 1:27 am

I sent you by pm the capx, and here it is too.

http://goo.gl/fRvZy

I'll improve it to contain an event to check if the touch was on the right or left of the first touch.

EDITED:
Finished, test and say if it help, please.TELLES08082013-04-19 01:42:03
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,209
Reputation: 18,357

Post » Fri Apr 19, 2013 1:43 am

EDIT: NevermindExcal2013-04-19 01:47:58
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: luckyrawatlucky, mindragon73 and 27 guests