View Single Post
Newspaz Newspaz's Avatar

JCF Member

Joined: Jan 2001

Posts: 2,678

Newspaz has disabled reputation

Aug 1, 2005, 03:48 PM
Newspaz is offline
Reply With Quote
Code:
import jj2


gameLoop = jj2.GameLoop()

if gameLoop.get_gameType() == "ctf":
    print "Changing to battle..."
    gameLoop.set_gameType("battle")
else:
    print "Changing to capture the flag..."
    gameLoop.set_gameType("ctf")
Just posting a sample of one of the things I have so far... to try and inspire some of you.
(It also automatically checks if the game is running, if you are the server, and if it's the right version of JJ2)