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

Topics - Revae

#1
Weird thing I can't seem to get to work.  I have a character with a very tall hat, and due to this I'd like his text to appear lower than normal (so it's over his head, not his hat).  So I've been using SayAt for this, and it generally works fine... until now (dun dun dun).

The camera pans up to him in a window.  I have him say something from the window.  Camera pans down.  He moves Then walks left and speaks again.  Like this: 

Code: AGS

function room_FirstLoad(){

player.Walk(205, 1772, eBlock, eWalkableAreas);
player.Say("Feynman!  Come down!  It's important!");

int xpos7 = 0;
int ypos7 = 1035;
while (ypos7 > 125) {
  SetViewport(xpos7, ypos7);
  Wait(1);
  xpos7 = xpos7+5;
  ypos7 = ypos7-5;
}

cFeynman.Walk(1840, 688, eBlock, eWalkableAreas);
cFeynman.FaceCharacter(cPlayer, eBlock);
cFeynman.SayAt(cFeynman.x, cFeynman.y -350, 400,"I have a doorbell ya know!");
cFeynman.SayAt(cFeynman.x, cFeynman.y -350, 400,"I'll be right down...");
cFeynman.Walk(2044, 688, eBlock, eWalkableAreas);

while (ypos7 <= 1035){
  SetViewport(xpos7, ypos7);
  Wait(1);
  xpos7 = xpos7-5;
  ypos7 = ypos7+5;
}

cFeynman.x=1174;
cFeynman.y=1790;

cFeynman.Walk(550, 1780, eBlock, eWalkableAreas);

cFeynman.SayAt(cFeynman.x, cFeynman.y -350, 400,"Okay...");
cFeynman.SayAt(cFeynman.x, cFeynman.y -350, 400,"What did you want now?");
}


But when he says "Okay..." it's off screen somewhere instead of over his head.  I can't see where it's ending up so I can't really tell what's going on exactly.

Would changing his position with "cFeynman.x=1174;" and "cFeynman.y=1790;" affect this or maybe the camera pan?  I'm kinda at a loss.

Also:  Is there any way that I can have the position of his text permanently set instead of using SayAt every time?  It's not a big deal, but it'd be nice to know.  :P
#2
Recruitment / Scripter for Covling
Fri 04/01/2013 00:17:49
Project:
Covling - An adventure game!

Details:
I spose you'll want more than that.  It's part comedy (nothing zany or wacky though) part serious. 1024x768 resolution.  Logical puzzles for the most part.  Fantasy, but not traditional elves/goblins fantasy.  Link to announcement post: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47029.20

Positions Available:
UI/puzzle/game mechanics scripter/idea-bouncer-off-er.  Maybe we can become friends too.  I need some help scripting some UI things, and puzzles to free up time for me to focus on art.  Unpaid initially, but that could change if I end up in a position to sell the game (Which I hope to, but who knows).

Deadline:
No deadline at the moment, just kinda working through to getting a playable demo.

Comments:
Interested parties can reply to this thread or contact me via PM.  I can provide greater details about the plot and what-have-you through PMs if need be.

Edit:  I feel like I should add - I already have most of the UI done.  The inventory gui, verb coin, main menu, save/load menu's are all done.  And I can pop out some less advanced scripting as well as tweaking existing scripts to make them fit animations or what-have-you.
#3
So say I have my save GUI overlapping my main GUI, but when the save GUI is visible the buttons on my main GUI (Main Menu, Save, Load, Quit Game etc) still light up with the mouseover image.  I can't click the buttons or anything, but it's still distracting and pretty sloppy looking.  Is there an easy way to freeze gui's that aren't active, or a hard way even?  Or to freeze the rooms for that matter.

Edit (Solved):  I just ended up brute forcing it with a visibility swap.  I just made a gui with the background image being the main menu image with the buttons just drawn on.  When you open the save gui, the original main menu disappears and the fake main menu becomes visible to take it's place.  Best way I could come up with, and it works well enough for me to stop worrying about it.
#4
Wasn't planning on asking a tech question so shortly after my last problem, but:

I have a custom save gui that is working quite well.  It has 4 save slots, and in each slot I'd like to put a save description, then the date, then the time onto labels like so:

Jims Save (save description)
10/31/2012 (label 1)
23:40 (label 2)

But I can't figure out how I'd get the labels that hold the date and time to stay after you quit the game/start a new game.  From what I've read the easiest way would be to use the save description as the date/time, but I'd like to have both.  Is there a way to store the information in-game, or to pop it out into the save file or another external file or some-such?  If all else fails I can always fall back on using the save description, but I'd rather not compromise.

Edit: Solved in next post.  Gracias.
#5
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.
#6
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.
#7
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!
#8
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.
#9
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!
#10
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