Nein das stammt aus dem Script des Kanadiers.
Die Globals sehen folgendermaßen aus:
ash:
// Main header script - this will be included into every script in
// the game (local and global). Do not place functions here; rather,
// place import definitions and #define names here to be used by all
// scripts.
// +++ The following are not necessary but Cool functions +++
import function Black();
import function Back();
import function UHE();
import function Unhandled();
#define DIR_UP 2
#define DIR_LEFT -1
#define DIR_DOWN 0
#define DIR_RIGHT 1
import function FaceDirection (int CharId, int dir);
import function FaceNorth(this Character*);
import function FaceSouth(this Character*);
import function FaceWest(this Character*);
import function FaceEast(this Character*);
import function Talk(this Character*, String What);
// +++ The followings is made to simplify lives +++++++++++++
enum ACTION
{
aPush, aPull, aGive,
aOpen, aClose, aUse,
aWalkTo, aPickUp, aLookAt,
aTalkTo, aTurnOn, aTurnOff,
};
asc:
// main global script file
function APPLY_CUSTOM()
{
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// XXXXXX XX XX XXXXXX XXXXXXXX XXXXXXX XXX XXX
// XX XX XX XX XX XX XX XX XX XX XX
// XX XX XX XXXXXX XX XX XX XX X XX
// XX XX XX XX XX XX XX XX XX
// XXXXXX XXXXXXX XXXXXX XX XXXXXXX XX XX
//
//
// XXXXXX XXXXXXXX XXX XX XXXXXX XXXXXX (TM)
// XX XX XX XX XX XX
// XXXXXX XX XX XX XXXX XXXX
// XX XX XX XX XX XX
// XXXXXX XX XXXXXXX XX XX
//
//
//----------------------------------------------
// Set the player Here using their SCRIPT names
//----------------------------------------------
PLAYER_1ID = cSyd;
PLAYER_2ID = cHoagie;
PLAYER_3ID = cRazor;
//----------------------------------------------
//
//
//----------------------------------------------
// Choose the colors of Things
//----------------------------------------------
COLOR_ACT_LINE_NORMAL = C64COLOR_PINK;
COLOR_ACT_LINE_MOUSEOVER = C64COLOR_YELLOW;
COLOR_INV_NORMAL = C64COLOR_PINK;
COLOR_INV_MOUSEOVER = C64COLOR_YELLOW;
COLOR_CHANGE_P_NORMAL = C64COLOR_PBLUE;
COLOR_CHANGE_P_MOUSEOVER = C64COLOR_YELLOW;
//----------------------------------------------
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Reset_Line()
{
mouse.Mode = eModeWalkto;
Action_Verb = "Walk to";
LblAction.Text = "Walk to";
Action = aWalkTo;
}
function Black()
{
gMainGui.Visible = false;
mouse.Visible = false;
LblAction.Visible = false;
LBL_MESSAGE_TOP.Text = ""; // black will always erase this one.
}
function Back()
{
gMainGui.Visible = true;
mouse.Visible = true;
LblAction.Visible = true;
}
function Talk(this Character*, String What)
{
LBL_MESSAGE_TOP.TextColor = this.SpeechColor;
LBL_MESSAGE_TOP.Text = What;
int tempo = this.View;
this.StopMoving(); // just to be sure
int Cmpt =0;
String Empty = " ";
while (Cmpt < What.Length)
{
Empty = String.Format("%s ",Empty);
Cmpt++;
}
this.Say(Empty);
LBL_MESSAGE_TOP.Text = "";
Reset_Line();
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function FaceNorth(this Character*) {this.FaceLocation(this.x, 0, eBlock);}
function FaceSouth(this Character*) {this.FaceLocation(this.x, 300, eBlock);}
function FaceWest(this Character*) {this.FaceLocation(0,this.y, eBlock);}
function FaceEast(this Character*) {this.FaceLocation(1000, this.y, eBlock);}
function FaceDirection (int CharId, int dir){
int dx = dir;
int dy = 0;
if (dx == DIR_DOWN) dy = 1;
else if (dx == DIR_UP)
{
dy = -1;
dx = 0;
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function UPDATE_ACTION()
{
LblAction.Text = Action_Verb;
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function New_Player(Character* WhoSNext)
{
Black();
// +++ Visual Show again Character ++++++++++++++++
bChangeP1.Visible = true; lChangeP1.Visible = true;
bChangeP2.Visible = true; lChangeP2.Visible = true;
bChangeP3.Visible = true; lChangeP3.Visible = true;
// ++++++++++++++++++++++++++++++++++++++++++++++++
// +++ Erase the next player button +++++++++++++++
if (lChangeP1.Text == WhoSNext.Name){bChangeP1.Visible = false; lChangeP1.Visible = false;}
if (lChangeP2.Text == WhoSNext.Name){bChangeP2.Visible = false; lChangeP2.Visible = false;}
if (lChangeP3.Text == WhoSNext.Name){bChangeP3.Visible = false; lChangeP3.Visible = false;}
// ++++++++++++++++++++++++++++++++++++++++++++++++
if (player.Room == WhoSNext.Room)
{
if (Room.Width > 320){// transitional room so scroll
int Cmpt = GetViewportX();
int Dest = WhoSNext.x;
if (player.x > Dest) { // SCROLL RIGHT
while(Cmpt > Dest-160)
{
SetViewport(Cmpt, GetViewportY());
Cmpt=Cmpt-4;
Wait(1);
}
}
else { // SCROLL LEFT
while(Cmpt < Dest-160)
{
SetViewport(Cmpt, GetViewportY());
Cmpt=Cmpt+4;
Wait(1);
}
}
}
ReleaseViewport();
}
WhoSNext.SetAsPlayer();
Back();
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// A function that initializes a bunch of stuff.
function initialize_control_panel() {
// Centre the control panel
gPanel.Centre();
// Centre the Restart dialog as well
gRestartYN.Centre();
if (!IsSpeechVoxAvailable()) {
// If there is no speech-vox file, and therefore no speech,
// disable all the controls related with speech.
lblVoice.Visible = false;
btnVoice.Visible = false;
sldVoice.Visible = false;
}
else {
// If there *is*, then set it to voice and text. It's best to use
// both whenever possible, for the player's sake.
// SetVoiceMode(eSpeechVoiceAndText);
// And reflect this in the control panel.
// btnVoice.Text = "Voice and Text";
}
if (!System.SupportsGammaControl) {
// If we can't change the gamma settings, disable the relevant options.
sldGamma.Visible = false;
lblGamma.Visible = false;
}
//And now, set all the defaults
SetMusicMasterVolume(100);
sldMusic.Value = 200;
sldSound.Value = 200;
SetSoundVolume(200);
SetGameSpeed(40);
sldSpeed.Value = 40;
// if (IsSpeechVoxAvailable()) {
// SetVoiceMode(eSpeechVoiceAndText);
// btnVoice.Text = "Voice and Text";
// sldVoice.Value = 255;
// SetSpeechVolume(255);
// }
if (System.SupportsGammaControl) {
System.Gamma = 100;
sldGamma.Value = 100;
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Called when the game starts, before the first room is loaded
function game_start() {
initialize_control_panel();
APPLY_CUSTOM();
// ++++ STEP 1 - JUST BEING SURE The verbs buttons are on the same ROW ++++
bOpen.Y = bPush.Y; bWalkTo.Y = bPush.Y; bTalkTo.Y = bPush.Y; bChangeP1.Y = bPush.Y; // Row1
bClose.Y = bPull.Y; bPickUp.Y = bPull.Y; bTurnOn.Y = bPull.Y; bChangeP2.Y = bPull.Y; // Row2
bUse.Y = bGive.Y; bLookAt.Y = bUse.Y; bTurnOff.Y = bGive.Y; bChangeP3.Y = bGive.Y; // Row3
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ STEP 2 - JUST BEING SURE The verbs buttons are on the same Columns ++++
bPull.X = bPush.X; bGive.X = bPush.X; //Column1
bClose.X = bOpen.X; bUse.X = bOpen.X; //Column2
bPickUp.X = bWalkTo.X; bLookAt.X = bWalkTo.X; //Column3
bTurnOn.X = bTalkTo.X; bTurnOff.X = bTalkTo.X; //Column4
bChangeP2.X = bChangeP1.X; bChangeP3.X = bChangeP1.X; //Column5
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ STEP 3 - JUST BEING SURE EVERYTHING IS ALIGN ON THE WORD INV ++++
cinvent1hg.Y = bGive.Y+bGive.Height+3;
cinvent2hd.Y = cinvent1hg.Y; // Hidden top-Right Button
cinvent3bg.Y = cinvent1hg.Y+cinvent1hg.Height;
cinvent4bd.Y = cinvent3bg.Y; // Hidden Bottom-Right Button
linv1hg.SetPosition(cinvent1hg.X, cinvent1hg.Y); // Top-left Label over Top-left Hidden Button
linv2hd.SetPosition(cinvent2hd.X, cinvent2hd.Y); // Top-right Label over Top-right Hidden Button
linv3bg.SetPosition(cinvent3bg.X, cinvent3bg.Y); // Bottom-left Label over Bottom-left Hidden Button
linv4bd.SetPosition(cinvent4bd.X, cinvent4bd.Y); // Bottom-right Label over Bottom-right Hidden Button
btnInvU2.Y = cinvent1hg.Y;
bINV_Down.Y = cinvent3bg.Y;
bINV_Down.X = btnInvU2.X;
bChangeP2.X = bChangeP1.X; bChangeP3.X = bChangeP3.X;
lChangeP1.SetPosition(bChangeP1.X, bChangeP1.Y);
lChangeP2.SetPosition(bChangeP2.X, bChangeP2.Y);
lChangeP3.SetPosition(bChangeP3.X, bChangeP3.Y);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ STEP 3 - BECAUSE USUALLY PPL STARTS WITH NO INV ++++++++++++++++++++
// (DON'T PANIC - If it's not the case it will be reajusted automatically)
btnInvU2.Visible = false;
bINV_Down.Visible = false;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ STEP 4 - TO MAKE EVERYTHING COOL AND FINE +++++++++++++++++++++++++
// Nice looking start (TM)
Action = aWalkTo;
Action_Verb = "Walk to";
Action_Object = "";
mouse.Mode = eModeWalkto;
lChangeP1.Text = PLAYER_1ID.Name; lChangeP1.TextColor = COLOR_CHANGE_P_NORMAL;
lChangeP2.Text = PLAYER_2ID.Name; lChangeP2.TextColor = COLOR_CHANGE_P_NORMAL;
lChangeP3.Text = PLAYER_3ID.Name; lChangeP3.TextColor = COLOR_CHANGE_P_NORMAL;
// Erase the actual player button
if (player.Name == lChangeP1.Text) {bChangeP1.Visible = false; lChangeP1.Visible = false;}
if (player.Name == lChangeP2.Text) {bChangeP2.Visible = false; lChangeP2.Visible = false;}
if (player.Name == lChangeP3.Text) {bChangeP3.Visible = false; lChangeP3.Visible = false;}
// Erase contains of the top line
LBL_MESSAGE_TOP.Text = "";
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function repeatedly_execute() {
// put anything you want to happen every game cycle, even when
// the game is paused, here
if (IsGamePaused() == 1) return;
// put anything you want to happen every game cycle, but not
// when the game is paused, here
//*************************************************
// Because There is of Scrolling Rooms
int RPosX = mouse.x + GetViewportX();
int RPosY = mouse.y + GetViewportY();
String Ecran= Game.GetLocationName(mouse.x, mouse.y);
String Verbe_Aff = Action_Verb;
//*************************************************
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++ STEP 1 - AUTO_COLOR THE GUI
// ACTION LINE
// PUSH
// PULL
// GIVE
// -------------------------------------------------------------
// TOP-LEFT INVENTORY |UP BUTTON | TOP-RIGHT INVENTORY
// DOWN-LEFT INVENTORY |D. BUTTON | BOTTOM-RIGHT INVENTORY
// -------------------------------------------------------------
int TOP_ACT_LINE = gActionLine.Y;
int BOT_ACT_LINE = gActionLine.Y + gActionLine.Height;
int TOP_ROW_TOP = gMainGui.Y + cinvent1hg.Y;
int TOP_ROW_BTM = gMainGui.Y+ cinvent1hg.Y + cinvent1hg.Height -1;
int BTM_ROW_TOP = gMainGui.Y + cinvent3bg.Y;
//no need for BTM_ROM_BTM (nothing else down here)
int ROW_P1 = gMainGui.Y + bChangeP1.Y;
int ROW_P2 = gMainGui.Y + bChangeP2.Y;
int ROW_P3 = gMainGui.Y + bChangeP3.Y;
if (mouse.Visible == true) // if the mouse is not visible then it will no bother with that
{
// Top to down
if (mouse.y >= TOP_ACT_LINE && mouse.y < BOT_ACT_LINE){ LblAction.TextColor = COLOR_ACT_LINE_MOUSEOVER; Action_Object="";}
else LblAction.TextColor = COLOR_ACT_LINE_NORMAL;
if (mouse.y >= BTM_ROW_TOP && mouse.x < bINV_Down.X && linv3bg.Text!=null) {linv3bg.TextColor = COLOR_INV_MOUSEOVER;Action_Object = linv3bg.Text;}
else linv3bg.TextColor = COLOR_INV_NORMAL;
if (mouse.y >= BTM_ROW_TOP && mouse.x > bINV_Down.X+bINV_Down.Width&& linv4bd.Text!=null){ linv4bd.TextColor = COLOR_INV_MOUSEOVER;Action_Object = linv4bd.Text;}
else linv4bd.TextColor = COLOR_INV_NORMAL;
if (mouse.y >= TOP_ROW_TOP && mouse.x < bINV_Down.X && mouse.y <= TOP_ROW_BTM&& linv1hg.Text!=null){ linv1hg.TextColor = COLOR_INV_MOUSEOVER;Action_Object = linv1hg.Text;}
else linv1hg.TextColor = COLOR_INV_NORMAL;
if (mouse.y >= TOP_ROW_TOP && mouse.x > bINV_Down.X+bINV_Down.Width && mouse.y <= TOP_ROW_BTM && linv2hd.Text!=null){ linv2hd.TextColor = C64COLOR_YELLOW;Action_Object = linv2hd.Text;}
else linv2hd.TextColor = COLOR_INV_NORMAL;
if (mouse.x >= bChangeP1.X)
{
if (mouse.y >= ROW_P1 && mouse.y < ROW_P2) lChangeP1.TextColor = COLOR_CHANGE_P_MOUSEOVER;
else lChangeP1.TextColor = COLOR_CHANGE_P_NORMAL;
if (mouse.y >= ROW_P2 && mouse.y < ROW_P3) lChangeP2.TextColor = COLOR_CHANGE_P_MOUSEOVER;
else lChangeP2.TextColor = COLOR_CHANGE_P_NORMAL;
if (mouse.y >= ROW_P3 && mouse.y < ROW_P3+ bChangeP3.Height) lChangeP3.TextColor = COLOR_CHANGE_P_MOUSEOVER;
else lChangeP3.TextColor = COLOR_CHANGE_P_NORMAL;
}
else
{
lChangeP1.TextColor = COLOR_CHANGE_P_NORMAL;
lChangeP2.TextColor = COLOR_CHANGE_P_NORMAL;
lChangeP3.TextColor = COLOR_CHANGE_P_NORMAL;
}
if (mouse.y < TOP_ROW_TOP) Action_Object=""; // Remove selection
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//-------------------------------------------------
if (Action_Object == null) Action_Object = "";
if (Ecran == null) Ecran = "";
if (Action_Verb == null || Action_Verb == "") {Action_Verb = "Walk to (acV)"; Action = aWalkTo; mouse.Mode = eModeWalkto;}
String Line = "";
//-------------------------------------------------
// +++++++++++ NOW LET'S UPDATE THAT ACTION LINE
if (Action == aGive){
if (GetLocationType(mouse.x, mouse.y) != eLocationCharacter) Ecran = ""; // Can't give to object or hotspot
if (player.ActiveInventory == null && Action_Object == "") Line = String.Format("Give ");
else if (player.ActiveInventory == null && Action_Object != "") Line = String.Format("Give %s",Action_Object);
else if (player.ActiveInventory != null) Line = String.Format("Give %s to %s",player.ActiveInventory.Name, Ecran);
}
else if (Action ==aUse)
{
if (player.ActiveInventory == null && Action_Object == "") Line = String.Format("Use ");
else if (player.ActiveInventory == null && Action_Object != "") Line = String.Format("Use %s", Action_Object);
else if (player.ActiveInventory != null && Action_Object == "") Line = String.Format("Use %s with %s",player.ActiveInventory.Name, Ecran);
else if (player.ActiveInventory != null && Action_Object != "")Line = String.Format("Use %s with %s",player.ActiveInventory.Name, Action_Object);
}
else
{
if (Ecran == "") Ecran = Action_Object; // olny here (can't give with inventory)
Line = String.Format("%s %s",Action_Verb, Ecran);
}
LblAction.Text = Line;
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function repeatedly_execute_always()
{
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// STEP 1 - Update Inventory buttons Up and Down
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if (gMainGui.Visible == true) // If not visible, it's a waste of time
{
if (INV_Hidden.TopItem > 0)
btnInvU2.Visible = true;
else
btnInvU2.Visible = false;
if ((INV_Hidden.TopItem + 4) > (INV_Hidden.ItemCount-1))
bINV_Down.Visible = false;
else
bINV_Down.Visible = true;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// STEP 2 - Update labels of the visible inventory
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++ A - Top-Left Label
if (INV_Hidden.ItemCount>0)
linv1hg.Text = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem].Name;
else
linv1hg.Text ="";
// +++ B - Top-Right Label
if (INV_Hidden.ItemCount>1 && (INV_Hidden.TopItem+1 < INV_Hidden.ItemCount))
linv2hd.Text = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+1].Name;
else
linv2hd.Text ="";
// +++ C - Bottom-Left Label
if (INV_Hidden.ItemCount>2 && (INV_Hidden.TopItem+2 < INV_Hidden.ItemCount))
linv3bg.Text = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+2].Name;
else
linv3bg.Text ="";
// +++ D - Bottom-Right Label
if (INV_Hidden.ItemCount>3 && (INV_Hidden.TopItem+3 < INV_Hidden.ItemCount))
linv4bd.Text = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+3].Name;
else
linv4bd.Text ="";
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function show_save_game_dialog()
{
gSaveGame.Visible = true;
// Get the list of save games
lstSaveGamesList.FillSaveGameList();
if (lstSaveGamesList.ItemCount > 0)
{
// If there is at least one, set the default text
// to be the first game's name
txtNewSaveName.Text = lstSaveGamesList.Items[0];
}
else
{
// No save games yet, default empty text.
txtNewSaveName.Text = "";
}
mouse.UseModeGraphic(eModePointer);
}
function show_restore_game_dialog()
{
gRestoreGame.Visible = true;
lstRestoreGamesList.FillSaveGameList();
mouse.UseModeGraphic(eModePointer);
}
function close_save_game_dialog()
{
gSaveGame.Visible = false;
mouse.UseDefaultGraphic();
}
function close_restore_game_dialog()
{
gRestoreGame.Visible = false;
mouse.UseDefaultGraphic();
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function unhandled_event (int what, int type)
{
if (Action == aLookAt) player.Talk ("That looks like nothing dude.");
else if (Action == aOpen) player.Talk("That doesn't seems to open.");
else if (Action == aPickUp) player.Talk("I can't pick that up.");
else if (Action == aPull || Action==aPush) player.Talk("I can't move that.");
else player.Talk("That dosen't seems to work.");
player.ActiveInventory = null;
}
function UHE()
{
unhandled_event(1, 1);
}
function Unhandled() {
unhandled_event(1, 1);
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Called when a key is pressed. keycode holds the key's ASCII code
function on_key_press(eKeyCode keycode) {
// The following is called before "if game is paused keycode=0", so
// it'll happen even when the game is paused.
if ((keycode == eKeyEscape) && gRestartYN.Visible) {
//Use ESC to cancel restart.
gRestartYN.Visible = false;
// If the panel's not ON, then the player must have gotten here by tapping F9,
// therefore his cursor needs restoring. If the panel IS on, then it doesn't,
// because it's already a pointer. Get used to thinking like this!!
if (!gPanel.Visible) mouse.UseDefaultGraphic();
return;
}
if ((keycode == eKeyEscape) && gPanel.Visible) {
// Use ESC to turn the panel off.
gPanel.Visible = false;
mouse.UseDefaultGraphic();
return;
}
if ((keycode == eKeyEscape) && (gSaveGame.Visible))
{
// Use ESC to close the save game dialog
close_save_game_dialog();
return;
}
if ((keycode == eKeyEscape) && (gRestoreGame.Visible))
{
// Use ESC to close the restore game dialog
close_restore_game_dialog();
return;
}
if (keycode == eKeyReturn) {
// ENTER, in this case merely confirms restart
if (gRestartYN.Visible) RestartGame();
}
if (IsGamePaused() || (IsInterfaceEnabled() == 0))
{
// If the game is paused with a modal GUI on the
// screen, or the player interface is disabled in
// a cut scene, ignore any keypresses.
return;
}
// FUNCTION KEYS AND SYSTEM SHORTCUTS
if (keycode == eKeyEscape) {
// ESC
gPanel.Visible = true;
mouse.UseModeGraphic(eModePointer);
}
if (keycode == eKeyCtrlQ) QuitGame(1); // Ctrl-Q
if (keycode == eKeyF5) show_save_game_dialog(); // F5
if (keycode == eKeyF7) show_restore_game_dialog(); // F7
if (keycode == eKeyF9) {
// F9, asks the player to confirm restarting (so much better to always confirm first)
gRestartYN.Visible = true;
mouse.UseModeGraphic(eModePointer);
}
if (keycode == eKeyF12) SaveScreenShot("scrnshot.bmp"); // F12
// GAME COMMAND SHORTCUTS
if (keycode == 'Q'){Action_Verb = "Push"; Action = aPush; Mouse.Mode = eModePuPuTonTo ;}
if (keycode == 'A'){Action_Verb = "Pull"; Action = aPull; Mouse.Mode = eModePuPuTonTo ;}
if (keycode == 'Z'){Action_Verb = "Give"; Action = aGive; Mouse.Mode = eModeInteract ;}
if (keycode == 'W') {Action_Verb = "Open"; Action = aOpen; Mouse.Mode = eModeOpenClose ;}
if (keycode == 'S') {Action_Verb = "Close"; Action = aClose; Mouse.Mode = eModeOpenClose ;}
if (keycode == 'X') {Action_Verb = "Use"; Action = aPush; Mouse.Mode = eModeInteract ;}
if (keycode == 'E') {Action_Verb = "Walk to"; Action = aWalkTo; Mouse.Mode = eModeWalkto ;}
if (keycode == 'D') {Action_Verb = "Pick up"; Action = aPickUp; Mouse.Mode = eModePickup ;}
if (keycode == 'C') {Action_Verb = "Look At"; Action = aLookAt; Mouse.Mode = eModeLookat ;}
if (keycode == 'R') {Action_Verb = "Talk To"; Action = aTalkTo; Mouse.Mode = eModeTalkto ;}
if (keycode == 'F') {Action_Verb = "Turn on"; Action = aTurnOn; Mouse.Mode = eModePuPuTonTo ;}
if (keycode == 'V') {Action_Verb = "Turn off"; Action = aTurnOff; Mouse.Mode = eModePuPuTonTo ;}
// For extra cursor modes, such as pick up, feel free to add as you will.
// Uncomment the line below if you use the "Pick Up" mode.
//if (keycode == 'P' || keycode == 'G') mouse.Mode=eModePickup;
// DEBUG FUNCTIONS
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
if (keycode == eKeyCtrlW && game.debug_mode)
player.PlaceOnWalkableArea(); //Ctrl-W, move to walkable area
}
function on_mouse_click(MouseButton button) {
// called when a mouse button is clicked. button is either LEFT or RIGHT
if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}
else if (button == eMouseLeft || button==eMouseRight)
{
//*************************************
// Because There is of Scrolling Rooms
int RPosX = mouse.x + GetViewportX();
int RPosY = mouse.y + GetViewportY();
Character* ThatGuy;
Object* ThatObject;
Hotspot* ThatSpot;
//*************************************
// Case 1 - Click Nowhere gave you walk
if (mouse.Mode != eModeWalkto && Game.GetLocationName(mouse.x, mouse.y) == "")
{
mouse.Mode = eModeWalkto;
Action = aWalkTo;
Action_Verb = "Walk to";
}
else if (mouse.Mode == eModeWalkto)
{
ProcessClick(mouse.x, mouse.y, eModeWalkto);
}
// ++++ AUTO Case 1 - Give olny to Character
// Char Auto Give
else if (Action == aGive)
{
if (player.ActiveInventory != null && GetLocationType(mouse.x, mouse.y) == eLocationCharacter) // automatik
{
ThatGuy = Character.GetAtScreenXY(mouse.x, mouse.y);
if (ThatGuy == cRazor || ThatGuy == cHoagie || ThatGuy == cSyd)
{
if (ThatGuy.x > player.x+30)player.Walk(ThatGuy.x-30, ThatGuy.y, eBlock, eWalkableAreas);
else if (ThatGuy.x < player.x +30)player.Walk(ThatGuy.x+30, ThatGuy.y, eBlock, eWalkableAreas);
else {} // don't move they are exanging stuff
player.FaceCharacter(ThatGuy, eBlock);
ThatGuy.FaceCharacter(player, eBlock);
ThatGuy.AddInventory(player.ActiveInventory);
player.LoseInventory(player.ActiveInventory);
}
else // Give to Other Character
{
// ThatGuy.RunInteraction(eModeUseinv);
ProcessClick(RPosX, RPosY, mouse.Mode);
}
}
else {} // Don't give it's an object or an hospot
}
// Any others verb or action
else
{
ProcessClick(RPosX, mouse.y, mouse.Mode );
}
}
else if (button == eMouseMiddle) {ProcessClick(mouse.x, mouse.y, eModeWalkto); }
else if (button == eMouseWheelNorth) {
// Mouse-wheel up, cycle cursors
// If mode isn't WALK, set the previous mode (notice usage of numbers instead
// of eNums, when it suits us)...
if (mouse.Mode>0) mouse.Mode=mouse.Mode-1;
else
{
// ...but if it is WALK mode...
if (player.ActiveInventory!=null)
{
//...and the player has a selected inventory item, set mouse mode to UseInv.
mouse.Mode=eModeUseinv;
}
else
{
// If they don't, however, just set it to mode TALK (change this line if you add more cursor modes)
mouse.Mode=eModeTalkto;
}
}
}
}
//START OF CONTROL PANEL FUNCTIONS
function btnSave_OnClick(GUIControl *control, MouseButton button)
{
gPanel.Visible = false;
mouse.UseDefaultGraphic();
Wait(1);
}
function btnQuit_OnClick(GUIControl *control, MouseButton button)
{
gPanel.Visible = false;
Wait(1);
QuitGame(1);
gPanel.Visible = true;
mouse.UseModeGraphic(eModePointer);
}
function btnLoad_OnClick(GUIControl *control, MouseButton button)
{
gPanel.Visible = false;
mouse.UseDefaultGraphic();
Wait(1);
}
function btnResume_OnClick(GUIControl *control, MouseButton button)
{
gPanel.Visible = false;
mouse.UseDefaultGraphic();
}
function sldMusic_OnChange(GUIControl *control)
{
SetMusicMasterVolume(sldMusic.Value);
}
function sldSound_OnChange(GUIControl *control)
{
// This sets the sound volume. Note it'll also affect MOD and XM music - read the manual
SetSoundVolume(sldSound.Value);
}
function sldVoice_OnChange(GUIControl *control)
{
// Sets voice volume. Note that we don't check for the existence of speech.vox -
// we did that in game_start, so if it's not there the slider won't even be available.
SetSpeechVolume(sldVoice.Value);
}
//function btnVoice_OnClick(GUIControl *control, MouseButton button)
// {
// Note that we don't check for the existence of speech.vox - we did that in game_start,
// so if it's not there the button won't even be available.
// if (btnVoice.Text == "Voice and Text") {
// SetVoiceMode(eSpeechVoiceOnly);
// btnVoice.Text = "Voice only";
// }
// else if (btnVoice.Text == "Voice only") {
// SetVoiceMode(eSpeechTextOnly);
// btnVoice.Text = "Text only";
// }
// else if (btnVoice.Text == "Text only") {
// SetVoiceMode(eSpeechVoiceAndText);
// btnVoice.Text = "Voice and Text";
// }
// }
function sldGamma_OnChange(GUIControl *control)
{
// Set the gamma. Note there's no need to check for anything else, as we ensured,
// in game_start, that the slider won't even appear if it's not possible to do this.
System.Gamma = sldGamma.Value;
}
function btnDefault_OnClick(GUIControl *control, MouseButton button)
{
// Reset everything to default. You'll have to edit these as well as the sliders
// if you'd rather have different default parameters.
SetMusicMasterVolume(100);
sldMusic.Value = 200;
sldSound.Value = 200;
SetSoundVolume(200);
sldSpeed.Value = 40;
SetGameSpeed(40);
// if (IsSpeechVoxAvailable()) {
// SetVoiceMode(eSpeechVoiceAndText);
// btnVoice.Text = "Voice and Text";
// sldVoice.Value = 255;
// SetSpeechVolume(255);
// }
if (System.SupportsGammaControl) {
System.Gamma = 100;
sldGamma.Value = 100;
}
}
//END OF CONTROL PANEL FUNCTIONS
function sldSpeed_OnChange(GUIControl *control)
{
SetGameSpeed(sldSpeed.Value);
}
function btnRestart_OnClick(GUIControl *control, MouseButton button)
{
gRestartYN.Visible=true;
}
function btnRestartYes_OnClick(GUIControl *control, MouseButton button)
{
RestartGame();
}
function btnRestartNo_OnClick(GUIControl *control, MouseButton button)
{
gRestartYN.Visible = false;
// If the panel's not ON, then the player must have gotten here by tapping F9,
// therefore his cursor needs restoring. If the panel IS on, then it doesn't,
// because it's already a pointer. Get used to thinking like this!!
if (!gPanel.Visible) mouse.UseDefaultGraphic();
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// The folowings are For The save / Load dialogs
function btnCancelSave_OnClick(GUIControl *control, MouseButton button)
{
close_save_game_dialog();
}
function btnSaveGame_OnClick(GUIControl *control, MouseButton button)
{
int gameSlotToSaveInto = lstSaveGamesList.ItemCount + 1;
int i = 0;
while (i < lstSaveGamesList.ItemCount)
{
if (lstSaveGamesList.Items[i] == txtNewSaveName.Text)
{
gameSlotToSaveInto = lstSaveGamesList.SaveGameSlots[i];
}
i++;
}
SaveGameSlot(gameSlotToSaveInto, txtNewSaveName.Text);
close_save_game_dialog();
}
function btnCancelRestore_OnClick(GUIControl *control, MouseButton button)
{
close_restore_game_dialog();
}
function btnRestoreGame_OnClick(GUIControl *control, MouseButton button)
{
if (lstRestoreGamesList.SelectedIndex >= 0)
{
RestoreGameSlot(lstRestoreGamesList.SaveGameSlots[lstRestoreGamesList.SelectedIndex]);
}
close_restore_game_dialog();
}
function lstSaveGamesList_OnSelectionCh(GUIControl *control)
{
txtNewSaveName.Text = lstSaveGamesList.Items[lstSaveGamesList.SelectedIndex];
}
function txtNewSaveName_OnActivate(GUIControl *control)
{
// Pressing return in the text box simulates clicking the Save button
btnSaveGame_OnClick(control, eMouseLeft);
}
function btnDeleteSave_OnClick(GUIControl *control, MouseButton button)
{
if (lstSaveGamesList.SelectedIndex >= 0)
{
DeleteSaveSlot(lstSaveGamesList.SaveGameSlots[lstSaveGamesList.SelectedIndex]);
lstSaveGamesList.FillSaveGameList();
}
}
// +++ End of the Save / load dialog
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++++++++++++++++++++++++ ALL BUTTONS AND OPTIONS TO THE C64 GUI ARE DOWN HERE +++++++++++++++
// +++++++ Col1
function bPush_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Push";
Action = aPush;
Mouse.Mode = eModePuPuTonTo ; }
function bPull_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Push";
Action = aPush;
Mouse.Mode = eModePuPuTonTo ; }
function bGive_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Give";
Action = aGive;
Mouse.Mode = eModeInteract ; }
// +++++++ Col2
function bOpen_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Open";
Action = aOpen;
Mouse.Mode = eModeOpenClose ;}
function bClose_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Close";
Action = aClose;
Mouse.Mode = eModeOpenClose ; }
function bUse_OnClick(GUIControl *control, MouseButton button){
Action_Verb = "Use";
Action = aUse;
Mouse.Mode = eModeInteract ;}
// +++++++ Col3
function bWalkTo_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Walk to";
Action = aWalkTo;
Mouse.Mode = eModeWalkto ; }
function bPickUp_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Pick up";
Action = aPickUp;
Mouse.Mode = eModePickup ; }
function bLookAt_OnClick(GUIControl *control, MouseButton button){
Action_Verb = "Look at";
Action = aLookAt;
Mouse.Mode = eModeLookat ;}
// +++++++ Col4
function bTalkTo_OnClick(GUIControl *control, MouseButton button){
Action_Verb = "Talk to";
Action = aTalkTo;
Mouse.Mode = eModeTalkto ;}
function bTurnOn_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Turn on";
Action = aTurnOn;
Mouse.Mode = eModePuPuTonTo; }
function bTurnOff_Click(GUIControl *control, MouseButton button) {
Action_Verb = "Turn off";
Action = aTurnOff;
Mouse.Mode = eModePuPuTonTo; }
function btnInvU2_OnClick(GUIControl *control, MouseButton button){Display("here");INV_Hidden.ScrollUp();}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// +++ Button for changing the player
function bChangeP1_OnClick(GUIControl *control, MouseButton button){
New_Player(PLAYER_1ID);}
function bChangeP2_OnClick(GUIControl *control, MouseButton button){
New_Player(PLAYER_2ID);}
function bChangeP3_OnClick(GUIControl *control, MouseButton button){
New_Player(PLAYER_3ID);}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function cinvent1hg_Click(GUIControl *control, MouseButton button) {
if (INV_Hidden.ItemCount>0 && (INV_Hidden.TopItem < INV_Hidden.ItemCount))
{
if ((Action == aUse || Action == aGive) && player.ActiveInventory == null){
player.ActiveInventory = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem];
mouse.Mode = eModeUseinv;}
else
if (Action != aGive) INV_Hidden.ItemAtIndex[INV_Hidden.TopItem].RunInteraction(mouse.Mode);
}
}
function cinvent2hd_Click(GUIControl *control, MouseButton button) {
if (INV_Hidden.ItemCount>1 && (INV_Hidden.TopItem+1 < INV_Hidden.ItemCount))
{
if ((Action == aUse || Action == aGive)&& player.ActiveInventory == null){
player.ActiveInventory = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+1];
mouse.Mode = eModeUseinv;}
else
if (Action != aGive) INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+1].RunInteraction(mouse.Mode);
}
}
function cinvent3bg_Click(GUIControl *control, MouseButton button) {
if (INV_Hidden.ItemCount>2 && (INV_Hidden.TopItem+2 < INV_Hidden.ItemCount))
{
if ((Action == aUse || Action == aGive)&& player.ActiveInventory == null){
player.ActiveInventory = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+2];
mouse.Mode = eModeUseinv;}
else
if (Action != aGive) INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+2].RunInteraction(mouse.Mode);// item sur item
}
}
function cinvent4bd_Click(GUIControl *control, MouseButton button) {
if (INV_Hidden.ItemCount>3 && (INV_Hidden.TopItem+3 < INV_Hidden.ItemCount))
{
if ((Action == aUse || Action == aGive)&& player.ActiveInventory == null){
player.ActiveInventory = INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+3];
mouse.Mode = eModeUseinv;}
else
if (Action != aGive) INV_Hidden.ItemAtIndex[INV_Hidden.TopItem+3].RunInteraction(mouse.Mode);
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++ Exporting stuff
// Cool functions
export Black;
export Back;
export UHE;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function iKey_Look()
{
player.Talk("It's a glowing key.");
}
function iChainsaw_Interact()
{
player.Talk("The chainsaw is out of gaz!");
}
function iDeadHamster_UseInv()
{
if (player.ActiveInventory == iGreenCrystal)
{
player.Talk("Yeah I'm using the green cristal on the Dead Hamster!");
Black();
Wait(40);
Back();
player.Talk("Wow! it Works!");
player.LoseInventory(iDeadHamster);
player.AddInventory(iHamsterAlive);
}
else
{
UHE();
}
}
function bINV_Down_OnClick(GUIControl *control, MouseButton button)
{
INV_Hidden.ScrollDown();
}
function dialog_request(int param) {
}
Wollte damit arbeiten, da es schlanker ist als die Scripts von den ursprünglichen MMM-Starterpaks.
Zumal sind Eigenschaften auch wirksam über den Editor editierbar und müssen nicht im Script erst mühevoll gesucht und zurechtgefummelt werden.
Bei den MMM-Starterpaks haben Veränderungen über den Editor am GUI oder sonstwo meistens gar keine Auswirkungen.
In der Test-Version, die ich vom Kanadier bekommen habe, funktionieren die Actions.
Einzig was nicht funktioniert, sind die Raumwechsel und das ist ein elementares Problem.
BG
der Volltanker