Mercurial > fife-parpg
diff demos/rpg/scripts/gamecontroller.py @ 530:ea26e7b6f56c
Added the loadActor and loadItem functions so you can load single items at any time.
Cleaned up the base object a bit so you can modify it's position easily.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 28 May 2010 20:10:33 +0000 |
parents | 796d49ab9380 |
children | 801746c5bb9a |
line wrap: on
line diff
--- a/demos/rpg/scripts/gamecontroller.py Fri May 28 16:25:00 2010 +0000 +++ b/demos/rpg/scripts/gamecontroller.py Fri May 28 20:10:33 2010 +0000 @@ -197,7 +197,19 @@ Might be useful if you want to have the game parse a command. Not sure if I am going to keep this or not. """ + result = "" + + args = command.split(" ") + for arg in args: + arg = arg.strip() + + if args[0] == "spawn": + if len(args) != 4: + result = "Usage: spawn [itemid] [posx] [posy]" + else: + result = "Success!" + return result def newGame(self):