Can i use some Maniac Mansion Mania Backgrounds and char sprites for the game intro im making. For my game.
I downloaded them off the web site under resoures.
I downloaded them off the web site under resoures.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote
Error: Run_text_script1: error -6 running game start
Error: Array index out of bounds index 10.9)
// SCRIPT HEADER
// --- action ---
#define A_SWITCH_TO -2
#define A_DEFAULT -1
#define A_WALK_TO 0
#define A_LOOK_AT 1
#define A_TALK_TO 2
#define A_GIVE_TO 3
#define A_PICK_UP 4
#define A_USE 5
#define A_OPEN 6
#define A_CLOSE 7
#define A_PUSH 8
#define A_PULL 9
#define A_COUNT_ 10
#define A_LOOKIN 11 // NEW
#define A_USE_INV -3
#define A_HELP -4
// GLOBAL SCRIPT
//Action Functions
function TranslateAction (string result, int action, string objects,
string item){
// get translated action template
if (action == A_WALK_TO) StrCopy (result, "Walk to %s");
else if (action == A_LOOK_AT) StrCopy (result, "Look at %s");
else if (action == A_LOOKIN) StrCopy (result, "Look in %s"); // NEW
else if (action == A_TALK_TO) StrCopy (result, "Talk To %s");
else if (action == A_GIVE_TO)
{
if (StrLen (item) > 0) StrCopy (result, "Give !s to %s");
else StrCopy (result, "Give To %s");
}
else if (action == A_PICK_UP) StrCopy (result, "Pick Up %s");
else if (action == A_USE)
{
if (StrLen (item) > 0) StrCopy (result, "Use !s with %s");
else StrCopy (result, "Use %s");
}
else if (action == A_OPEN) StrCopy (result, "Open %s");
else if (action == A_CLOSE) StrCopy (result, "Close %s");
else if (action == A_PUSH) StrCopy (result, "Push %s");
else if (action == A_PULL) StrCopy (result, "Pull %s");
else if (action == A_SWITCH_TO) StrCopy (result, "Switch To %s");
// fill object and item into action template
StrCopy (result, GetTranslation (result));
int ip = StrContains (result, "!s");
if (ip >= 0)
{
int op = StrContains (result, "%s");
StrSetCharAt (result, ip, '%');
if (ip < op) StrFormat (result, result, item, objects);
else StrFormat (result, result, objects, item);
}
else StrFormat (result, result, objects);
}
function isAction (int test_action){
return global_action == test_action;
}
function UsedAction (int test_action){
return ((used_action == test_action) && (GSagsusedmode !=
MODE_USEINV)) || ((test_action == A_USE_INV) && (used_action == A_USE)
&& (GSagsusedmode == MODE_USEINV));
}
function SetAction (int new_action){
// set default action
if (new_action == A_DEFAULT) new_action = default_action;
// set corresponding cursormode
if (new_action == A_WALK_TO) SetCursorMode (9);
else if (new_action == A_LOOK_AT) SetCursorMode (1);
else if (new_action == A_TALK_TO) SetCursorMode (3);
else if (new_action == A_GIVE_TO) SetCursorMode (2);
else if (new_action == A_PICK_UP) SetCursorMode (5);
else if (new_action == A_USE) SetCursorMode (2);
else if (new_action == A_OPEN) SetCursorMode (8);
else if (new_action == A_CLOSE) SetCursorMode (8);
else if (new_action == A_PUSH) SetCursorMode (8);
else if (new_action == A_PULL) SetCursorMode (8);
else if (new_action == A_LOOKIN) SetCursorMode (1); // NEW
// save action
global_action = new_action;
}
function SetDefaultAction (int def_action){
default_action = def_action;
SetAction (A_DEFAULT);
}
// ============================= GlobalCondition ===========================================
// Dont know what to put here if i need to
function GlobalCondition (int parameter){
// here are some conditions that are used many times in the script
int cond;
if (parameter == 1)
{
// if the mouse is in the inventory and modes Walk or pickup are selected
cond = ((GetInvAt (mouse.x, mouse.y) >= 0) && (isAction
(A_WALK_TO) || isAction (A_PICK_UP)));
}
else if (parameter == 2)
{
// if the mode is useinv and the mouse is over the active inv (like "use knife on knife")
cond = ((character [GetPlayerCharacter ()].activeinv == GetInvAt
(mouse.x, mouse.y)) && (GetCursorMode () == 4));
}
else if (parameter == 3)
{
// if the mode is talk, or "Give", and the mouse isnt over a character
cond = ((isAction (A_TALK_TO) || (isAction (A_GIVE_TO) &&
(GetCursorMode () == 4))) && (GetLocationType (mouse.x, mouse.y) != 2));
}
else if (parameter == 4)
{
// if its GIVE and the mouse isnt over a inv.item
cond = ((GetCursorMode () == 2) && isAction (A_GIVE_TO) && (GetInvAt
(mouse.x, mouse.y) < 0));
}
if (parameter == 5)
{
// if its over the "other characters" buttons in the inventory.
cond = ((GetGUIAt (mouse.x, mouse.y) == MAINGUI) && ((GetGUIObjectAt
(mouse.x, mouse.y) == 12) || (GetGUIObjectAt (mouse.x, mouse.y) == 13)));
}
return cond;
}
// This is under Action
RemoveExtension (location);
AddExtension ('l', location); // set default action "look at"
}
SetAlternativeAction (location, 'n', A_DEFAULT);
SetAlternativeAction (location, 'g', A_GIVE_TO);
SetAlternativeAction (location, 'p', A_PICK_UP);
SetAlternativeAction (location, 'u', A_USE);
SetAlternativeAction (location, 'o', A_OPEN);
SetAlternativeAction (location, 'l', A_LOOK_AT);
SetAlternativeAction (location, 's', A_PUSH);
SetAlternativeAction (location, 'c', A_CLOSE);
SetAlternativeAction (location, 't', A_TALK_TO);
SetAlternativeAction (location, 'y', A_PULL);
//SetAlternativeAction (location, 'j', A_LOOKIN); // Game will crash if used
RemoveExtension (location);
StrCopy (SHOWNlocation, location);
}
// Translation // This makes GUI botton work doing the // on any other one's turns them off in the game
// --- translate GUI action buttons ---
SetActionButtons (A_GIVE_TO, "a_button_give 0 1 2 Dd");
SetActionButtons (A_PICK_UP, "a_button_pick_up 1 7 8 Ee");
SetActionButtons (A_USE, "a_button_use 2 13 14 Ww");
SetActionButtons (A_OPEN, "a_button_open 3 3 4 Aa");
SetActionButtons (A_LOOK_AT, "a_button_look_at 4 9 10 Qq");
SetActionButtons (A_PUSH, "a_button_push 5 15 28 Xx");
SetActionButtons (A_CLOSE, "a_button_close 6 5 6 Ss");
SetActionButtons (A_TALK_TO, "a_button_talk_to 7 11 12 Cc");
SetActionButtons (A_PULL, "a_button_pull 8 29 30 Zz");
// SetActionButtons (A_LOOKIN, "a_button_lookin 9 29 30 Zz"); // Game will crash if used Dont know //what to set it at
// Unhandled Event
if (UsedAction (A_CLOSE))
{
DisplaySpeech (GetPlayerCharacter (), "Did not work.");
}
else if (UsedAction (A_USE) && type >= 5)
{
//if inv on inv:
DisplaySpeech (GetPlayerCharacter (), "Didnt work.");
}
else if (UsedAction (A_LOOK_AT))
{
if (GetGlobalInt(12)==0) { Display("Cool."); SetGlobalInt(12,1); }
else if ( GetGlobalInt(12)==1) { DisplaySpeech
(GetPlayerCharacter(), "ok.");
SetGlobalInt(12,2); }
else if ( GetGlobalInt(12)==2) { DisplaySpeech
(GetPlayerCharacter(), "Dude."); SetGlobalInt(12,3); }
else if ( GetGlobalInt(12)==3) { DisplaySpeech
(GetPlayerCharacter(), "Its Cool.");
SetGlobalInt(12,0); }
}
else if ((UsedAction (A_PUSH)) || (UsedAction (A_PULL)))
{
DisplaySpeech (GetPlayerCharacter(), "Take that.");
}
else if (UsedAction (A_PICK_UP))
{
DisplaySpeech (GetPlayerCharacter(), "Cant pick that up.");
}
else if (UsedAction (A_LOOKIN)) // NEW
{
DisplaySpeech (GetPlayerCharacter(), "Nothing inside it."); // NEW
}
else if (UsedAction (A_OPEN))
{
DisplaySpeech (GetPlayerCharacter(), "Cant open it.");
}
else if (UsedAction (A_TALK_TO))
{
if (type == 2)
{
DisplaySpeech (GetPlayerCharacter (), "Ich habe nichts zu sagen.");
}
else DisplaySpeech (GetPlayerCharacter (), "Das klappt so nicht.");
}
else if (type == 4)
{
DisplaySpeech (GetPlayerCharacter (), "Das klappt so nicht.");
}
else if (UsedAction (A_USE) || UsedAction (A_USE_INV))
{
// else if (UsedAction(A_USE)) {
DisplaySpeech (GetPlayerCharacter (), "Didnt work.");
}
////////////////////////////////////////////////////
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.046 seconds with 14 queries.