Menu

Show posts

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 Menu

Messages - Etcher Squared Games

#181
[I read manual and searched forums and couldn't find anything, if there is, please kindly point me to the right direction and my apologies if I missed something....]

So, I know that several commands do not actually execute until the script is done.Ã,  I've gotten in the habit of just running everything in script.Ã,  So, what I've done up to this point, if I need action1, dialog, action2....
We'll say on the interact click I'll just put 2 actions of both scripts..

script 1:Ã, 
action
action
RunDialog(4);

script2:
action
action


both of these scripts being part of what happens during the interact click...
by the first script ending, that causes RunDialog(4) to actually run
after that is done, script2 runs...


but I've run into a problem now where I've need 4 scripts, but #3 is NOT getting run...

background:
main character is "ROBERTA"
these actions are getting generated but using an item on a character named LOANGUY
during the scene "ROBBER" comes in and says stuff and eventually "BOND" comes in too


here is script 1
------------------------------------------------------------------------------------------------------------------------------------

Display("a1");
if ((GetCursorMode() == 4) && (character[ROBERTA].activeinv == 3))
Ã,  {
Ã,  Ã, 
Ã,  Ã,  Ã,  Ã,  StartCutscene(1);Ã,  Ã,  // start a cutscene
Ã,  Ã,  Ã,  Ã,  IN_MIDDLE = 1;Ã,  Ã,  Ã,  Ã, // this is a global I use to help me out
Ã,  Ã,  Ã,  Ã,  Cursors_gamehourglass();Ã,  Ã, // a function that disables all cursors but the hourglass and shows only hour glass
Ã,  Ã,  Ã,  Ã,  MoveCharacterBlocking(ROBERTA, 110, 167, 0);Ã,  // move roberta closer to loan guy
Ã,  Ã,  Ã,  Ã,  RunDialog(9);Ã,  Ã,  // a conversation between roberta and loan guy
Ã,  }Ã, 
Ã, 
Ã, 
Ã,  Display("b1");

-------------------------------------------------------------------------------------------

the above runs just fine...I see "a1" and "b1" showing

now script 2

------------------------------------------------------------------------------------------------------------------------------------
Display("a2");
if (IN_MIDDLE == 1)
{
Ã,  Display("Just then, you here some rustling at the door.");Ã,  Ã, // a message
Ã,  character[ROBBER].room = 5;Ã,  Ã,  //
Ã,  character[ROBBER].x = 78;Ã,  Ã,  Ã,  Ã,  //
Ã,  character[ROBBER].y = 250;Ã,  Ã,  Ã,  //
Ã,  FaceLocation(ROBBER, 78, 0);Ã,  Ã,  //
Ã,  MoveCharacterBlocking(ROBBER, 78, 187, 1);Ã,  //
// the last 5 lines place my robber in the room, but out of screen then move him
// into the room
Ã,  RunDialog(10);Ã,  // a stick 'em up dialog of just the robber
}
Display("b2");

-----------------------------------------------------------

this too runs just fine, I see "a2" and "b2" show up
the conversation works ok too, and for those wondering if that is broken, here's the script for dialog 10
@SÃ,  // dialog startup entry point
return
@1Ã,  // option 1
ROBBER:Ã,  "All right everyone, hands in the air!Ã,  I want everyone's money!"
stop

so I think I'm doing it right...



now script 3, this is the one getting skipped:


------------------------------------------------------------------------------------------------------------------------------------
Display("a3");
if (IN_MIDDLE == 1)
{
Ã,  Display("OH NO!Ã,  The bank is getting robbed.Ã,  Your dreams of Sierra-On-Line are quickly fading away.");
Ã,  Display("But what's this...?");
Ã,  Display("Once again you hear something outside the door.");
Ã,  Display("This time it's a police car, and someone is bursting in.");
Ã,  character[BOND].room = 5;
Ã,  character[BOND].x = 78;
Ã,  character[BOND].y = 250;
Ã,  FaceLocation(BOND, 78, 0);
Ã,  MoveCharacterBlocking(BOND, 78, 190, 1);
Ã,  ChangeCharacterView(ROBBER, 14);
Ã,  RunDialog(11);
}Ã, 
Display("b3");

----------------------------

this script3 NEVER happens.... I don't even see the "a3" and "b3"


script 4, which executes......

------------------------------------------------------------------------------------------------------------------------------------
Display("a4");
if (IN_MIDDLE == 1)
{Ã, 
Ã,  robberyhappened = 1;Ã,  // the robbery event has occured
Ã,  IN_MIDDLE = 0;Ã,  Ã,  // turn off the fact I'm in the cutscene
Ã,  Cursors_gamenormal();Ã,  Ã, // return cursors to normal gameplay
Ã,  EndCutscene();Ã,  // end cut scene
}Ã, 
Display("b4");
Ã, 
----------------


I see the "a4" and "b4"

My only guess is this:
This is running via character "Loanguy"
but in script 2 I am 'touching' the ROBBER character...
does is invalidate the script 3 perhaps?Ã,  Ã, 


another question to pose here is...Am I even doing this properly?
is there a better way of doing this.Ã,  is there a more proper way about this?

thank you






#182
Hello, I am Bryan.  I've already posted here a few times, but I still consider myself a noob.  My user name is my "company" name.  I may explain it's history if enough people beg.

I've been using AGS about 3 weeks now, and if all goes well I'll finish my first game this weekend called "Sierra Quest 1: Roberta In Love" and I've had a blast making it.

Being a professional programmer by day, the scripting and engine have come rather easy to me.

Drawing still doesn't come easy to me, so my first game isn't going to look good.

That's why my next game, I'm going to have my brother do the drawing.

good luck to all the noobs, and have fun
#183
ok I think I got my own problem figured out...
dialog 6 LOOKED like this

@S  // dialog startup entry point
LOANGUY: "Hi, Mrs. Williams, if you have your game ideas, please show me them."
stop

but I decided to try 1 option, show = checked, say = unchecked, and that's it...

so now the dialog script looks like this.

// dialog script file
@S  // dialog startup entry point
return  // i used to have all dialog here
@1  // option 1
LOANGUY: "Hi, Mrs. Williams, if you have your game ideas, please show me them."
stop

can anyone explain why this is?


#184
Ok, when on the intro scene, someone clicks on new game it calls a function called Cursors_gamenormal();

here's the definition


function Cursors_gamenormal()
{
  EnableCursorMode(0);   // walk
  EnableCursorMode(1);  // look
  EnableCursorMode(2);  // interact
  EnableCursorMode(3);  // talk
  EnableCursorMode(4);  // inventory
  DisableCursorMode(6);  // pointer
  DisableCursorMode(7);  // wait cursor
}


one particular character has this script as what to do when talked to:
RunDialog(6);


dialog six looks like this

@S  // dialog startup entry point
LOANGUY: "Hi, Mrs. Williams, if you have your game ideas, please show me them."
stop


looking at other forum topics and the ags online help, it looks like I'm doing it right...


#185
So, after all chats with all my characters, the cursor automatically changes to the pointer cursor.

1. I don't want that.
2. That cursor is normally disabled in my game.


How do I get it to go back to the chat cursor.

thx in advance
#186
hey there, I'm new to all this myself, but I may be able to offer something to you from what I've learned so far....

have you set your inventory item size?

SetInvDimenstions

that and are you inventory items of the same size as set by said function?

perhaps it's too big and getting pushed off to the right or left?
#187
is there a way to make it where the next line only comes on like a mouse click, and not to automatically switch after so much time?
#188
I've done well learning AGS on my own...so I felt really bad when this is one thing that stumped me.  I'm reply to myself so that future people can benefit from my question.

1.  I had somehow missed there was a LEFTINV and RIGHTINV mouse event constants that are different from LEFT and RIGHT.  that's why stuff was never activated in script

2.  Through various other threads and tutorials, I had "handle inventory clicks in script" checked.... in my case this was a bad thing...  What I don't understand yet, is why would someone want this.  Anyone please clarify...

3.  Another thing I missed that I have only found one deeply hidden line against, is you HAVE to select inventory items with the cursor #2 INTERACT.  I was trying to use the pointer cursor.  But to note, there is a setmousecursor function.
so, you must SetCursorMode(2) but then make it look like anything else with SetMouseCursor(#).

4.  another thing that killed me and when I fixed this up this is what I think actually cured my problem, but again, would like someone else to possibly explain
I had a bunch a stray Disable/EnabledCursorMode commands.
I did have #2 interact enabled, but I don't know why it wasn't taking.  I've even tried unchecking handle inv in script.

5. Another thing I did, every tutorial I found had in them "add a look button, add a use button, add a close button"
originally I just had a close button, but defaulted the window to the USE cursor



but now it's working and I've even successfully (in like 5 min once I got everything else working) had interactions between one object to another (and they combined as I wanted....)



so, as I said, if anyone can explain what's going on here, for me and others, that would be much appreciated.

thank you
#189
I have a situation like this in my first game I'm making and I solved it in a different way...

the couch (table in my case)  I gave it 2 different walk behind sections..

in your case...

well I'm just going to make a pic and link it....
http://www.geocities.com/etchersquaredgames/ideacouch.JPG

with base lines and everything
#190
(please note that I read all I could throughout the forums and found no help otherwise....)

I even found a website tutorial:
http://www.digitalmindstudio.ch/script.php?id=4&page=2

now while I did NOT do everything on this page. I thought I was doing enough...

basically, this is my first game, so I don't care about look, use or whatever....I just want to for now open an inventory window (i can do that)....have my pointer arrow be the only cursor available (i can do that) then you click on the item to select it (i CAN'T do that)  and then click ok....

if you click ok while the arrow is still up, I default you back to walk...

I saw on these boards that it HAS to be the interact cursor to select an item...  I tried that...no go....I click on my inventory and just nothing happens....


here is my global script thus far.....

// main global script file



function Cursors_gamehourglass()
{
  DisableCursorMode(0);
  DisableCursorMode(1);
  DisableCursorMode(2);
  DisableCursorMode(6);
  EnableCursorMode(7);
  SetCursorMode(7);
}

function Cursors_gamearrow()
{
  DisableCursorMode(0);
  DisableCursorMode(1);
  DisableCursorMode(2);
  DisableCursorMode(7);
  EnableCursorMode(6);
  SetCursorMode(6);
}




function Cursors_gamenormal()
{
  EnableCursorMode(0);
  EnableCursorMode(1);
  EnableCursorMode(2);
  EnableCursorMode(6);
  DisableCursorMode(7);
}


int Direction_to_outsidebank = -1;  // 0 = from bank, 1 = from east






#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() // called when the game starts, before the first room is loaded
  {
    SetInvDimensions(20, 20);
  }
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE


#sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute()
  {
  // put anything you want to happen every game cycle here
  }
#sectionend repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE


function show_inventory_window()   
// This demonstrates both types of inventory window - the first part is how to
// show the built-in inventory window, the second part uses the custom one.
// Un-comment one section or the other below.
  {
  // ** DEFAULT INVENTORY WINDOW
// InventoryScreen();
   
  // ** CUSTOM INVENTORY WINDOW
  Cursors_gamearrow();
  DisableCursorMode(6);
  EnableCursorMode(2);
  SetCursorMode(2);
  SetMouseCursor(6);
  GUIOff(1);
  GUIOn (2);   
  }

#sectionstart on_key_press  // DO NOT EDIT OR REMOVE THIS LINE
function on_key_press(int keycode) // called when a key is pressed. keycode holds the key's ASCII code
  {
  if (IsGamePaused()==1) keycode=0; // game paused, so don't react to keypresses
  if (keycode==17) QuitGame(1); // Ctrl-Q
  if (keycode==363) SaveGameDialog(); // F5
  if (keycode==365) RestoreGameDialog(); // F7
  if (keycode==367) RestartGame(); // F9
  if (keycode==434) SaveScreenShot("scrnshot.pcx");  // F12
  if (keycode==9) show_inventory_window(); // Tab, show inventory
  if (keycode==19) Debug(0,0); // Ctrl-S, give all inventory
  if (keycode==22) Debug(1,0); // Ctrl-V, version
  if (keycode==1) Debug(2,0); // Ctrl-A, show walkable areas
  if (keycode==24) Debug(3,0); // Ctrl-X, teleport to room
  }
#sectionend on_key_press  // DO NOT EDIT OR REMOVE THIS LINE


#sectionstart on_mouse_click  // DO NOT EDIT OR REMOVE THIS LINE
function on_mouse_click(int 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==LEFT)
    {
    Display("ddd"); 
    ProcessClick(mouse.x,mouse.y,GetCursorMode());
    }
  else // right-click, so cycle cursor
    {   
    SetNextCursorMode();
    }
  }
#sectionend on_mouse_click  // DO NOT EDIT OR REMOVE THIS LINE





#sectionstart interface_click  // DO NOT EDIT OR REMOVE THIS LINE
function interface_click(int interface, int button)
  {
    if (interface == 1) // top side gui
    {
      if (button == 0) 
      {     
        //InventoryScreen();
        show_inventory_window();
        SetCursorMode(2);
      } 
    }
    else if (interface == 2)
    {
      if (button == 1)
      {
        GUIOff(2);
        GUIOn(1);
        Cursors_gamenormal();
        if (GetCursorMode() != 4)  // didn't select an item
          SetCursorMode(0);
      }
      else if (button == 2)
      {
        SetCursorMode(2);
        SetMouseCursor(6);
      }
      else
      {       
        string buffer;
        StrFormat (buffer, "%d", button);
        Display(buffer);
      } 
    }
  }
#sectionend interface_click  // DO NOT EDIT OR REMOVE THIS LINE






export Direction_to_outsidebank;

#sectionstart inventory1_a  // DO NOT EDIT OR REMOVE THIS LINE
function inventory1_a() {
  // script for inventory1: Use inventory on this item
 
}
#sectionend inventory1_a  // DO NOT EDIT OR REMOVE THIS LINE




if there is any other information you guys need let me know and I'll post it....
#191
Hello gaming fans...

My name is Bryan and my fake company name is
Etcher Squared Games.

the website (not much of one) is
www.geocities.com/etchersquaredgames/index.html

My first toy game I am making I call
Sierra Quest 1: Roberta in Love

the game follows a young Roberta Williams while she is trying to come up with ideas for her gaming company to convince a loan officer to give her the needed money.

I hope this screen link works:
(Now a jpg file...)

http://www.geocities.com/etchersquaredgames/preview.jpg



This is my first game using AGS and is short and for practice, but should be silly and fun.

With a learning curve I'm hoping to have it finished by September 1st, because I'm building, drawing, programming everything by myself.

For future projects I have friends that will help me.

--------------UPDATE 8-19-2004------------------
Intro is done.
Main portion of game is done.

left to do:
a game time cutscene needs added
The last ~3 actions of game need to be configured.
The final cutscene needs to be done.

I could be done with my game (- music of any sorts) by the end of this weekend assuming no deal breaking problems come up.



--------------UPDATE 8-21-2004------------------


I'm done coding the game and before I "officially" release it I'd like people to play it.

go here

www.geocities.com/etchersquaredgames

and click the link

or the direct link to download is

www.geocities.com/etchersquaredgames/sq1_ril.zip

Please, play and enjoy and most importantly, email me ANYTHING you have to say about...
just email to tell me you played it
etchersquaredgames@yahoo.com

thank you



--------------UPDATE 8-23-2004------------------
changes in first round:
bug fixes
misspellings
awkward text
added more hotspots
added more reactions to hotspots
support unhandled_events (thank you kinoko)

updated game is at same link specified in thread, but here it is again:

http://www.geocities.com/etchersquaredgames/sq1_ril.zip


--------------UPDATE 8-25-2004------------------
yes, I used mspaint
yes, the game is short
yes, the puzzles are simple
this was a "training project"
I simply ask you keep that in mind when you play

--------------UPDATE 8-26-2004------------------
updated zip file on my webpage
1. squeezed in screen walk edges so the game is more windowed happy
2. prettied up the GUI for changing cursors
3. made the inventory UI look a bit better


--------------UPDATE 8-28-2004------------------
more updates
1. some more bad text fixed up
2. the down talk animation was messed up in colors. bad palette, roberta would flash.Ã,  fixed that
new zip has been uploaded


--------------UPDATE 8-29-2004------------------
after testing the recent fixes and making sure nothing else is broken, I decided to release my game a few days ahead of schedule.
enjoy   ;D
SMF spam blocked by CleanTalk