[CF-Devel] button.c magic mouth suggestions

pstolarc at theperlguru.com pstolarc at theperlguru.com
Fri Sep 6 18:11:34 CDT 2002


On Fri, 06 Sep 2002 12:10:31 -0600 (MDT), you wrote:

>
     
     If sp is set and greater than zero on a magic mouth, it will respond only to
     
     >
     
     button push events.  If sp is set and less than zero, it will respond only to
     
     >
     
     button release.  This has made it easier for me to make maps where I want
     
     >
     
     things like a message when a gate opens and a different message when a gate
     
     >
     
     closes.  I chose 'sp' since it's the same variable that reverses button
     
     >
     
     push/release events on buttons.  Since 'sp' hasn't done anything on magic
     
     >
     
     mouths before, it shouldn't break any maps.
     
     
Solution exists already.  Set the attributes on the button to walk_on 0,
walk_off 1, and the button will only trigger on a walk_off.  Or visa-versa.

-Philip

    
    


More information about the crossfire mailing list