Jump to content
IGNORED

Something wrong with voice.playing


Recommended Posts

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

 


    buttonheld=2

 

titleloop:

    wait
    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

 

main_setup:
    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.

Link to comment
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
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...