Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------------------------------------------------
- // game_start
- //----------------------------------------------------------------------------------------------------
- function game_start()
- {
- }
- //----------------------------------------------------------------------------------------------------
- // repeatedly_execute
- //----------------------------------------------------------------------------------------------------
- function repeatedly_execute()
- {
- }
- //----------------------------------------------------------------------------------------------------
- // repeatedly_execute_always
- //----------------------------------------------------------------------------------------------------
- function repeatedly_execute_always()
- {
- }
- //----------------------------------------------------------------------------------------------------
- // on_key_press
- //----------------------------------------------------------------------------------------------------
- function on_key_press(eKeyCode keycode)
- {
- if (IsGamePaused()) keycode = 0;
- // "System Keys"
- if (keycode == eKeyCtrlQ) QuitGame(1); // Ctrl-Q
- if (keycode == eKeyF9) RestartGame(); // F9
- if (keycode == eKeyF12) SaveScreenShot("scrnshot.pcx"); // F12
- // Debugger Keys
- if (keycode == eKeyCtrlS) Debug(0,0); // Ctrl-S, give all inventory
- if (keycode == eKeyCtrlV) Debug(1,0); // Ctrl-V, version
- if (keycode == eKeyCtrlA) Debug(2,0); // Ctrl-A, show walkable areas
- if (keycode == eKeyCtrlX) Debug(3,0); // Ctrl-X, teleport to room
- }
- //----------------------------------------------------------------------------------------------------
- // on_mouse_click
- //----------------------------------------------------------------------------------------------------
- function on_mouse_click(MouseButton button)
- {
- // all mouse clicks are handled in TwoClickHandler.asc!
- }
- //----------------------------------------------------------------------------------------------------
- // on_event
- //----------------------------------------------------------------------------------------------------
- function on_event (EventType event, int data)
- {
- }
- //----------------------------------------------------------------------------------------------------
- // unhandled_event
- //----------------------------------------------------------------------------------------------------
- function unhandled_event (int what, int type)
- {
- if (what == 1) // Unhandled events for HOTSPOTS
- {
- if (type == 1) // look
- {
- player.Say("I see nothing special about it.");
- }
- if (type == 2) // interact
- {
- player.Say("I can't do anything with it.");
- }
- if (type == 3) // use inv on
- {
- player.Say("That won't do anything.");
- }
- }
- if (what == 2) // Unhandled events for OBJECTS
- {
- if (type == 0) // look
- {
- player.Say("Looks alright.");
- }
- if (type == 1) // interact
- {
- player.Say("I don't want to have it.");
- }
- if (type == 3) // use inv on
- {
- player.Say("That's a funny idea.");
- }
- }
- if (what == 3) // Unhandled events for CHARACTERS
- {
- if (type == 0) // look
- {
- player.Say("Hm.");
- }
- if (type == 1) // interact
- {
- player.Say("Got nothing to say.");
- }
- if (type == 3) // use inv on
- {
- player.Say("I don't think I should give that away.");
- }
- }
- if (what == 5) // Unhandled events for INVENTORY ITEMS
- {
- if (type == 0) // look
- {
- player.Say("It's just some junk in my inventory.");
- }
- if (type == 1) // interact
- {
- player.Say("Er, no?");
- }
- if (type == 3) // use inv on
- {
- player.Say("That's ridiculous.");
- }
- }
- }
- //----------------------------------------------------------------------------------------------------
- // dialog_request
- //----------------------------------------------------------------------------------------------------
- function dialog_request(int param)
- {
- }
- function btnQuit_OnClick(GUIControl *control, MouseButton button)
- {
- QuitGame(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement