CreatePlace(BobsHouse, Cottage) CreateCharacter(Bob, B) SetClothing(Bob, Peasant) SetPosition(Bob, BobsHouse.Door) ShowMenu()
RECEIVED: input Selected StartThen type these commands into the experience manager:
SetCameraFocus(Bob) HideMenu() EnableInput()
Camelot.exe -em_path "C:\XP\run.bat"
start [ActionName]([Action Arguments])
started [ActionName]([Action Arguments])Remember to only use double quotations in your strings.
start ShowMenu()After the player presses the start button, Camelot responds with:
input Selected Start
start Reset()After resetting is complete, Camelot responds with:
input Reset
succeeded [ActionName]([Action Arguments])
failed [ActionName]([Action Arguments])
stop [ActionName]([Action Arguments])Everything currently executed by that action is reversed.
# Send a command to Camelot. # Send a command to Camelot. def action(command): print('start ' + command) while(True): i = input() if(i == 'succeeded ' + command): return True elif(i == 'failed ' + command): return False elif(i.startswith('error')): return False # Set up a small house with a door. action('CreatePlace(BobsHouse, Cottage)') action('CreateCharacter(Bob, B)') action('SetClothing(Bob, Peasant)') action('SetPosition(Bob, BobsHouse.Door)') action('EnableIcon(Open_Door, Open, BobsHouse.Door, Leave the house, true)') action('ShowMenu()') # Respond to input. while(True): i = input() if(i == 'input Selected Start'): action('SetCameraFocus(Bob)') action('HideMenu()') action('EnableInput()') elif(i == 'input Open_Door BobsHouse.Door'): action('SetNarration(The door is locked!)') action('ShowNarration()') elif(i == 'input Close Narration'): action('HideNarration()')
python em.py
input [Action name] [Entity name]
input arrived [Character name] position [Entity name]This is important for place exits that do not include a door and only send an arrived message.
exited Player position [Entity name]
input Key Pause
input Key Inventory
input Key Interact