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
68
S
24
G
11
Posts: 452
Reputation: 12,238

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
44
S
23
G
13
Posts: 723
Reputation: 14,905

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
168
S
50
G
163
Posts: 8,220
Reputation: 105,059

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
68
S
24
G
11
Posts: 452
Reputation: 12,238

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
168
S
50
G
163
Posts: 8,220
Reputation: 105,059

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
68
S
24
G
11
Posts: 452
Reputation: 12,238

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
168
S
50
G
163
Posts: 8,220
Reputation: 105,059

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
68
S
24
G
11
Posts: 452
Reputation: 12,238


Return to How do I....?

Who is online

Users browsing this forum: luck1210, SoldjahBoy, tarek2 and 3 guests