Touch plugin (is touching) not solving my problem

0 favourites
  • 2 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)