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 - Revae

#21
AGS Games in Production / Covling
Mon 29/10/2012 03:42:55
Hello folk!

I've been working on this off-and-on for a while now, and I figured I'd announce it in some capacity.  I'm not going to go into detail about the story as it's kinda all over the place.  You play an alcoholic Covling named Cecil.  Covlings are fantasy muppet-like creatures who come from an area of the world called the cove.  The cove is an area of the world where physics have partially broken down and magical artifacts are dug up for study by mages.

Then some stuff goes down, and you set off on an adventure.

Spent a lot of time developing an art style that was quick enough to produce, and a lot more time learning scripting (I'm still terrible at it).  If that doesn't get your hopes unnaturally high for this game, then I dunno what will!  Maybe screenshots...

^ This is the cove
^ This is a bar (Charlies Chugery)
^ This is a house
It looks even better in motion.
Edit:  Here, have some concept art I did for it.

One of the things I'm trying to accomplish with this game is keep the characters grounded in the environment.  In many point and clicks the characters seem to float/standout from the background.  Not that that makes them bad games, but it's always been a pet peeve of mine (It's not easy to do it turns out  :P)

Another thing I want to do is to keep the scenery changing, without too much backtracking (naturally there will be a little), so it feels like a real adventure.  Like you're traversing a large world of many cultures and races.  Not looking for key to get a book to find a note to get a code to open a safe to get an extendable stick to reach a hat... or... whatever.  Puzzles will be kept logical for the most part, and hopefully will all have at least 2 solutions (some of which depend on solutions to earlier puzzles).

That's the goal anyway.  So far I have the first puzzle done, and some of the gui script.  There isn't a set date for completion, it'll be done whenever it feels done.

Anyway.  Let me know what you guys think!  Also thanks to everyone on the help forums for being cool.
#22
Snap.  That's pretty tricky.  The code you suggested makes about half-sense to me though since I'm muddling through this.  I only partially understand was a struct is, and I don't know what * means in this context (though I plan on looking it up).  I also don't understand why you started counting at 2 instead of 1.

But I can definitely get it to work, even with my limited capabilities, thanks to you.  So...  Thanks.  To you.  :)

I may see if I can enlist the help of a scripter in the future because, while I can knock out art pieces all day, learning the scripting along the way has really taken a toll on my time.
#23
I have a save gui I'm working on.  All the code works fine from inside the global script, but I'd rather have my code somewhat cleaner than that (I say somewhat because I'm more an artist than a coder and it's pretty messy all over as is).

Anyway.  I understand that you have to import the scripts from the header files of each script (I've read other posts on this), but I'm having a hard time figuring out how to call the button functions from the script.  My save gui script looks like this:
Code: AGS

int SavSel=0;

//Funks//
function btnClsSavLd_OnClick(GUIControl *control, MouseButton button){
gSaveGameScreen.Visible = false;
gJournal.Visible=true;
}

function btnSelSlt1_OnClick(GUIControl *control, MouseButton button){
btnSelSltA.NormalGraphic=1552;

btnSelSlt2.NormalGraphic=1552;

btnSelSlt3.NormalGraphic=1552;

btnSelSlt1.NormalGraphic=1554;

SavSel=1;
}

function btnSelSlt2_OnClick(GUIControl *control, MouseButton button){
btnSelSltA.NormalGraphic=1552;

btnSelSlt1.NormalGraphic=1552;

btnSelSlt3.NormalGraphic=1552;

btnSelSlt2.NormalGraphic=1554;

SavSel=2;
}

function btnSelSlt3_OnClick(GUIControl *control, MouseButton button){
btnSelSltA.NormalGraphic=1552;

btnSelSlt2.NormalGraphic=1552;

btnSelSlt1.NormalGraphic=1552;

btnSelSlt3.NormalGraphic=1554;

SavSel=3;
}

function btnSelSltA_OnClick(GUIControl *control, MouseButton button){
btnSelSlt1.NormalGraphic=1552;

btnSelSlt2.NormalGraphic=1552;

btnSelSlt3.NormalGraphic=1552;

btnSelSltA.NormalGraphic=1554;

SavSel=4;
}


function btnSave_OnClick(GUIControl *control, MouseButton button){
  if (SavSel==1){
  gJournal.Visible=false;
  SaveGameSlot(1, "Save 1");
  gSaveGameScreen.Visible=false;
  }

  if (SavSel==2){
  gJournal.Visible=false;
  SaveGameSlot(2, "Save 2");
  gSaveGameScreen.Visible=false;
  }

  if (SavSel==3){
  gJournal.Visible=false;
  SaveGameSlot(3, "Save 3");
  gSaveGameScreen.Visible=false;
  }

  if (SavSel==4){
  gJournal.Visible=false;
  SaveGameSlot(4, "Auto Save");
  gSaveGameScreen.Visible=false;
  }

  else{
  
  }
}



What would I put in the header file, and how would I call the functions from the global file?  Thanks in advance!

Edit:  Alright. Solved in the very next post.  Thanks Khris.
#24
Quote from: Khris on Tue 24/01/2012 16:02:26
Revae, could you give some info about how you solved this?
Imagine someone else finding this in a few months with [solved] in the title and all and there's no actual solution :)

Sure.  I cheated.  Instead of having a transparent image for the button I used an opaque button with a background the same as the GUI.  Which makes more sense really anyway since the buttons in this case don't move around at all.

Sorry about that.
#25
Hey! Thanks everyone.  This has got to be the most helpful internet community in existence.  I particularly like the added conversation about details I didn't ask.  Helps to learn.

Andail - I definitely am thinking of it too grammatically.  Bad habit I'm sure, but I'm a-learnin'.  I'll pop in what you said when I get home, and hopefully it'll function properly.  (I can't imagine why it wouldn't). Gracias.

I'd done some scripting in the past, but this requires more than I've ever needed to know before, so it's getting tricky.  It's probably really messy too, but I don't think I'm going to clean any of it until I get it functioning at least.
#26
Hmm...  Didn't work.  Either way, with () or without.
#27
Red Belly - How could I not see that.  Thanks!

Andail - Ohhhhh.  I didn't know that.  The "()" is optional from what I've read, but recommended...  So I spose I'll test that out now...
#28
Hey folks!

I'm feeling pretty dumb at the moment.  I'm not a great scripter, and I've been stuck on this for a while.  I'd have searched for the answer but I couldn't think of a way to put it in the search field.

Problem is: I have a bartender with some rat poison behind him.  And if he's washing a glass or standing at the bar I want him to stop you from going behind the bar.  But if he's walked off then grabbing the rat poison is okay.  Like so:

function oRatPoison_PickUp(){
  if (cCharlie.View != 12 || 27){
    player.Walk(168, 577, eNoBlock, eWalkableAreas);
    player.Loop=7;
    player.LockView(4);
    player.Animate(7, 4, eOnce, eNoBlock, eForwards);
    player.UnlockView();
    oRatPoison.Visible=false;
}

  else{
    cCharlie.Say("Hey man... noone goes behind the bar but me...");
  }
}

But that doesn't work.  It just makes the rat poison invisible, skipping the player walking and regardless of Charlies view.

And I'm confused.  Any help would be rad.  Thanks!
#29
Pft.  It's always the most obvious places...  Don't know why I didn't think to look there.  Thanks.

The filesize is 60MB now.  Still ~3x larger than the original sprites, but much better, thank you.

Any reason the .spr file would be so much larger?  Or info on how it's generated?  I tried searching around, but it's hard to search for '.spr' without pulling up all sorts of others things.
#30
Beginners' Technical Questions / .spr filesize
Fri 16/03/2012 04:36:18
So my sprite images equal ~20MB total in their raw .png format.  But the .spr filesize is around 310MB. I have about 500 sprites used in the editor.

Is there a way to remedy this, or is their something I'm missing?  I don't even have my short demo done, and the game is much larger than I was hoping it would be at this point.

On an unrelated note, is there a way I can get it to stop greying out buttons when the script is blocking actions?

But mostly the filesize thing.
#31
Alright.  After some fudging about for a while I think I have all this figured out.  Thanks folks!

Though I don't know what "afaik" means.
#32
Wish I'd played around for 10 minutes more before posting that.  I have the buttons working, but not the background transparency.  So.  Yeah.  :D
#33
Hey all.

I've been trying to find information on making a "New game, Load game, etc." menu, but moreover, one with semi-transparency (a drop shadow).  What I'm trying to do exactly is make an inventory item that will open this:

Over whatever room you're in.

But when I have the GUI open by default there is no transparency, the background is black.  Whats more is the buttons, and title overlayed on the GUI background also aren't transparent, the parts that should be show up black as well.

The verbcoin templets inventory seems to get around this by having a separate underlay, but I can't figure out how they worked that out in any scripts.  I've looked around the internet for 2 days now, but the only gui scripting tutorials, or threads I can find are for AGS 2.6, or don't cover anything like this.

If worst comes to worst, I could fake it, but I'd lose the drop shadow, and it wouldn't look nearly as clean.  Not the end of the world, but I figure I should be learning as much as possible as I go, and this seems pretty useful.  Thanks in advance for any help!
#34
Yup.  Worked like a charm.  Or better than a charm rather.  In any even it's working now, and I have you to thank.

Thanks.  :)

I even have the code for repositioning the inventory almost working...  Busy day busy day.

Now to mark this as "Solved"
#35
Thanks Monkey!  I've actually seen your script floating around, but kinda wanted to give the bundled one a go (mostly to brush up on my scripting).

You were spot on with your guess as to what line was giving the error.

I'm at work now, but I'll give what you mentioned a go when I get home.  Seems like a more simple/clean solution to the one I was kicking around, and therefore will probably work, what with Occums razor and all.  I appreciate the quick reply.  :=
#36
Hello everyone!  I'm Matt, and here's my GUI.



I'm having trouble keeping the game from returning a null pointer using the verbcoin.  You see, my inventory takes up a small portion of the screen, and I didn't care for the way it closed when I dragged my mouse away from it.  So I added an 'X' button, and you can close it by right clicking, which works well enough.  But now if you try to use the verbcoin on a hotspot, object or character while the inventory is open it returns a null pointer error.  So I added some code to the end of the script here:

//===================================================================
// PROCESS VERBCOIN BUTTON CLICKS - INVENTORY
//-------------------------------------------------------------------
//
// Note: for each action the inventory item that is below the verbcoin should be used
// since the x- and y-coördinates are no longer valid, we use the saved mousex and mousey coördinates
// We can only avoid nullpointer errors by doing this check for each button.

         else{
            if (guixy == gui[verbc_id]) {
         if (control == look_button){
           gui[verbc_id].Visible = false;
                  Wait(1);

             Mouse.SetPosition(mousex,  mousey);
             if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot){
             Display("I'm busy");
           }
             else{
             if (GetLocationType(mouse.x, mouse.y) == eLocationObject){
             Display("I'm busy");
           }    
             else{
             if (GetLocationType(mouse.x, mouse.y) == eLocationCharacter){
             Display("I'm busy");
           }    
             
             else{    

             item2 = InventoryItem.GetAtScreenXY(mousex, mousey);
             item2.RunInteraction(eModeLookat); //look at item

             }
     
         }  
               if (control == talk_button){
           gui[verbc_id].Visible = false;
           
             Mouse.SetPosition(mousex,  mousey);
             if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot){
             Display("I'm busy");
           }
             else{
             if (GetLocationType(mouse.x, mouse.y) == eLocationObject){
             Display("I'm busy");
           }    
             else{
             if (GetLocationType(mouse.x, mouse.y) == eLocationCharacter){
             Display("I'm busy");
           }    
             
             else{            
       
                  Wait(1);
                  item2 = InventoryItem.GetAtScreenXY(mousex, mousey);
                  item2.RunInteraction(eModeTalkto); //talk to item
   
             }

//=============================================================
This is the part I added:
             Mouse.SetPosition(mousex,  mousey);
             if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot){
             Display("I'm busy");

etc...

Which works for the look action, but anything else below that doesn't work at all.  Display("I'm busy"); can be replaced with the ability to look or what-have-you, but I'm trying to keep it simple for now as I'm not the greatest script-er (clearly).

Anyway.  I've been plugging away at this for a few days now and this is as far as I've made it.  I'm hoping to have the inventory open where you right click too, but I'm gonna take this one step at a time  :P

Any insight as to why this isn't working would be greatly appreciated.  
Thanks in advance for any help!

Also I realize I probably should've started an introduction thread in the appropriate forum before asking for help, but I kinda wanted to hold off on that until I can make a little video of it.
SMF spam blocked by CleanTalk