On touching object end

Get help using Construct 2

Post » Mon Oct 01, 2012 12:45 am

Right so I can't invert on object touched and inverting touching object would call the action over and over. How do I make an action happen when a user stops touching a particular object?



ThanksDraspur2012-10-01 00:45:28
B
62
S
23
G
11
Posts: 450
Reputation: 11,929

Post » Mon Oct 01, 2012 7:27 am

Couldn't you use "On any touch end" and then "Is in touch" to see, if the object in question is still touched?
B
43
S
20
G
13
Posts: 723
Reputation: 14,635

Post » Mon Oct 01, 2012 7:10 pm

This is the solution. Two conditions, On Touch End & Is Touching Object will register one touch
B
11
S
3
G
2
Posts: 23
Reputation: 1,453

Post » Mon Oct 01, 2012 7:27 pm

I would wager you could use an instance variable, rather than "Is Touching Object" as well.
Image ImageImage
B
164
S
49
G
139
Posts: 7,968
Reputation: 92,402

Post » Mon Oct 01, 2012 11:11 pm

I'll try these if I can get the first event working thanks. Could you elaborate newt?
B
62
S
23
G
11
Posts: 450
Reputation: 11,929

Post » Mon Oct 01, 2012 11:35 pm

If you do a instance variable compare, like if object sprite variable "istouched" =1, then do a sub event with on touch end, that object should be in the sol.
Image ImageImage
B
164
S
49
G
139
Posts: 7,968
Reputation: 92,402

Post » Mon Oct 01, 2012 11:49 pm

[QUOTE=newt] If you do a instance variable compare, like if object sprite variable "istouched" =1, then do a sub event with on touch end, that object should be in the sol.[/QUOTE]

On any touch end? So making it a sub event would make it apply to the former properties, thus restricting it to that touch?
B
62
S
23
G
11
Posts: 450
Reputation: 11,929

Post » Mon Oct 01, 2012 11:54 pm

You would need an event to set that variable first, such as on object touched set variable "istouched" to 1.
Image ImageImage
B
164
S
49
G
139
Posts: 7,968
Reputation: 92,402

Post » Tue Oct 02, 2012 12:17 am

[QUOTE=newt] You would need an event to set that variable first, such as on object touched set variable "istouched" to 1.[/QUOTE]

But I need on touch end. Not is not touched
B
62
S
23
G
11
Posts: 450
Reputation: 11,929


Return to How do I....?

Who is online

Users browsing this forum: bbjGames, Lordshiva1948, mekonbekon, menos30, newt, Yahoo [Bot], Youtopize and 10 guests