Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: stop button

  1. #1
    New Coder
    Join Date
    Dec 2003
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    stop button

    Is it possible to disable the stop button on the toolbar?

    A friend of mine has a game where you buy alcohol and then go to other citys to sell it for more. Then you get a chance to buy a gun and you can rob the store so it just gives you some booze to sell. The downside is that sometimes you get shot when stealing and it ends the game. First it has an alert that you have been killed then it takes you to a page that says you were killed. But me being smart, i found out that if you hit ok on the alert then hurry and hit the stop button you can continue playing.

    Since cheating is bad, do you think it would be possible to disable the stop button on the toolbar?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    The solution that you should do is to set a global variable that tells the status of the game (e.g. gameOver = true/false). Then in the game, check its value and do the appropriate action based on the status.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New Coder
    Join Date
    Dec 2003
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What if the game opened in a pop up? I've seen them without toolbars. Is it possible to still "stop" the page from loading without one?

  • #4
    Regular Coder
    Join Date
    Mar 2003
    Posts
    241
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep. the [Esc]-key stops the pageload in Mozilla, Opera & IE on windows, I don't know if this is true for other browsers as well.

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts

    Solve the root of the problem, not the cause

    You should really put a game status variable
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •