Touch plugin (is touching) not solving my problem

Get help using Construct 2

Post » Fri May 20, 2016 8:41 am

Hi,

I have written a program in which, while condition is true I am calling a function named play() with using (is in touch).
I am calling different audio .ogg files added in music folder and calling from XML. XML is used to tell where and which audio to play.
Now in play() function I have an if condition where, while (sprite1 is touching) play some set of events. There are many events and also wait calls with many other functions (Note all in play() function with using (is in touch)). Everything is working fine but when I am calling audio from the other functions they are not played as planned. Reason I found is (is in touch) is not true now as I have removed my touch from the sprite and still many other events are pending to be called.

I guess this is the issue as when I touch the screen anywhere it calls the audio. But also still there are other functions and events which are after the audio are played. Is this a bug or I am doing wrong or is any other way to do this.

Regards,
Manu
B
6
Posts: 16
Reputation: 272

Post » Fri May 20, 2016 10:10 am

Most of the time, event organisation is the reason for code not "working", and rarely an actual Construct 2 bug.
The thing is though your description is not enough to tell for sure.

Consider posting your capx, or at least a screenshot of the events/functions you are referring to.

We don't know your code and can't guess it.
From the sound of it, it may be moreover involved/complex.

So no way to tell and correct it just by your text paragraph.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,319
Reputation: 87,487


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Casimir, Syazanie Amirin, tarek2 and 8 guests