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

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
24
G
13
Posts: 723
Reputation: 15,055

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
14
S
5
G
2
Posts: 23
Reputation: 1,728

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
173
S
50
G
194
Posts: 8,569
Reputation: 121,374

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

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
173
S
50
G
194
Posts: 8,569
Reputation: 121,374

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

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
173
S
50
G
194
Posts: 8,569
Reputation: 121,374

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


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests