Jump to content
Sign in to follow this  

Something wrong with voice.playing

Recommended Posts

I started working on an entry and ran into a problem with the voice.playing variable.





    if cont.button and buttonheld=2 then buttonheld=1
    if cont.button=0 and buttonheld=1 then buttonheld=3

    if buttonheld=3 then VOICE PLAY phrase : buttonheld=4 : goto main_setup
    goto titleloop


    if voice.playing then buttonheld=4 else buttonheld=5
    if buttonheld=4 then goto titleloop

   ...set up the rest of the game...


It will say the phrase once and NOT go set up the rest of the game like I want it to. Is there a problem with my code? I'm going crazy.

Share this post

Link to post
Share on other sites

It is because when buttonheld goes to 4, then it enters into "titleloop" and in that section of code nothing checks for buttonheld equal to 4.


Maybe you want to change one line to this:

if buttonheld=4 then goto main_setup
Edited by nanochess

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...