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
49
S
19
G
7
Posts: 429
Reputation: 8,993

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
42
S
19
G
12
Posts: 723
Reputation: 13,911

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 Image
B
161
S
48
G
90
Posts: 7,348
Reputation: 66,751

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
49
S
19
G
7
Posts: 429
Reputation: 8,993

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 Image
B
161
S
48
G
90
Posts: 7,348
Reputation: 66,751

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
49
S
19
G
7
Posts: 429
Reputation: 8,993

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 Image
B
161
S
48
G
90
Posts: 7,348
Reputation: 66,751

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
49
S
19
G
7
Posts: 429
Reputation: 8,993


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, Braus and 2 guests