Shut off Switches at the Completion of Text

● ARCHIVED · READ-ONLY
Started by Caedmon 5 posts View original ↗
  1. So I have an image I was animating of a character to make it appear to be talking however if the player did not click after the text the mouth would keep moving forever.  I would like the mouth to stop moving as soon as the text is all shown on the screen.

    Note this is not a face graphic, but is truly a large picture I am trying to animate.

    I tried using ATS: Special Message Codes and using \#{game_switches[id] = false}  I tried off instead of false as well.  Nothing seems to work for me.  any ideas? 
  2. I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    What is ATS: Special Message Codes? Please provide a link (don't copy and paste the script here - actually link to the thread or blog post that talks about it, and that contains the link to the actual script)
  3. please post screenshots of your events and links to the scripts used - sometimes it's only a typo when setting configuration options.
  4. Shaz: This does not have to be script support.  If someone knows a way to solve it via script or script call great, but I was also curious if someone knew how to event this.

    ATS is a modern Algebra script: http://rmrk.net/index.php?topic=44527.0

    Here are the two events in question.  

    Part1.png

    On this one the switch to have the second image run works fine, but its stopping it that doesn't work well.  I tried adding \#{game_switches[id] = false} to the end of the text line and what it does is stop the second event from even starting.

    Part2.png

    This is the loop event to make it appear as though the character is talking.  simple show pic and erase loop.

    Names have been removed to protect the innocent :)
  5. I assumed the codes you were using were being interpreted by the script and weren't working properly. In that case, it IS a Script Support issue.


    With your Show Picture, you don't have to use 2 pictures and constantly erase/show them alternately. Just use Show Picture, referring to the same picture number each time, but a different image. It will take care of the swapping of images on its own (and possibly give you better performance). Also, you don't need to use a script call to turn on the switch - you can just do it with Control Switches.


    I don't see how you're attempting to stop it. Also, your descriptions and pictures don't match up :) The second description refers to the first picture, and vice versa.


    I think what you need to add to the end of your message is this:

    \#{$game_switches[88]=false}which is pretty much what you said in your first post, but you put id. Did you PUT id? Or 88? Or 0088? I don't see any of that in your screenshot. Although some people say it's okay, I've seen enough people have troubles with it, and the situations seem to be different each time, that I highly recommend NOT putting on leading zeros. It might have them when you look in the editor, but they're not used that way in the scripts. And that may be your problem - if you used 0088, change it to just 88.
    If you've got that and it's STILL not working, can you post a screenshot of your event WITH that code in it?


    Is it possible there's something ELSE that's turning on that switch? If it still doesn't work after the above changes, play the message, and when it's finished, go into debug (F9) and find switch 88 and see if it says whether it's on or off.


    (Edit 5) ... also, what is the event where you have the loop? Is it an event on the map? A common event? Can you please show a screenshot of the WHOLE event window (we ALWAYS want to see the WHOLE event window when we ask you for event screenshots) - the REALLY important stuff is often NOT in the list of commands :)


    (Edit 6) ... after a closer look at that script, it appears the \#{code} is meant to let you run something that will return a result that will be displayed on the screen. That might mean it will give you unwanted results. Still, it does an eval to GET that result, so I would still expect it to work. If it does work, but gives you extra stuff you don't want, try this:

    Code:
    \#{$game_switches[88]=false;""}
    - that should give it an empty string to display.