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

#1
Hello all!

I'm working on a game where I want to give the player a number of tasks, and depending on what order they do it in, get different responses back to them. I want them to receive feedback view background dialogue. EX: the Prince says he needs his hat taken,shortly after Lady M says she needs a cigarette. If you do Lady M's task first, you hear a snippet of the conversation she's having, and afterward the prince makes some sort of snarky comment, seen as a background text display.

After talking with Gilbert, he thought timers would be the best and easiest way to do this sort of thing. After a little collaboration, this is the code currently in the game.

The problem is when the dialogue plays after you do someone's favor, the timer continues to run. Is there a way to pause the timer after a dialogue starts, and then restart it when the timer is over?

Jen

Code: ags


int line;
int timer; 
bool princeWasHelped = false;

function BGSay(this Character *,  String what)
{
  
  timer=100;
  this.SayBackground(what);
}

function room_FirstLoad()
{
  dStartTimer.Start();


}



function room_RepExec()
{
    if (IsTimerExpired(1)) {
    if (line==0)
    {
      cPrinceG.BGSay("Take my hat?");
      
      Wait (10); 
      
      cPriest.BGSay("Hang my cloak, please."); 
      
      Wait (10); 
      
      cLadyM.BGSay("A smoke, Daphne?");
      
    
    }
    if (line==1)
    {
      if (princeWasHelped == true) {
        cPrinceG.BGSay("Shall we enter the parlor now?");
      }
      
      if (princeWasHelped == false) {
        
        
      cPrinceG.BGSay("My hat, valet. Now.");
      
      }
    }
    if (line==2)
    {
      cPrinceG.BGSay("Utterly horrible service"); 
      //time=50;
    }
   SetTimer(1, timer);
   
   if (line<=17) line++;
   
   
    
    
  }
}



function oHat_Interact()
{
oHat.SetPosition(60, 660); 
princeWasHelped = true; 
dprinceWasHelped.Start(); 
}

#2
Hello! Jen here.

I'm working on a game where I want time to be a major mechanic, but not ACTUAL time. The longer someone plays as one character, I want the world to have distorted versions of object images, objects to disappear, dialogue to change, etc.

When I thought of how to do this in the code, I immediately wanted to use a countdown system rather than actual time because that would allow for the player to take things in at their own pace. However, I'm not sure how to approach this in code.

I'm not sure I understand the game.score function and how to manipulate it. It's my first instinct for how to accomplish this. Whenever the player does something or has a conversation, reduce score by 1, when score reaches x number, then put if/then functions on all the ojbects/backgrounds in game to change out the asset images, etc.

The other potential way to do it is make a global variable "Time" that's an int, with a starting value that shrinks down and resets whenever you return to character select, but again, I'm not sure how to code that properly.

I'm sorry if this question is too vague. Let me know if I can clarify anything.

Jen
#3
Hello everyone!

I'm Jen. I occasionally work on games with Dave Gilbert, and am finishing my Masters in Game Design this year. I've decided to make an adventure game in AGS for my master's thesis, given my skill set. At Dave's recommendation, I started building a game with a custom resolution of 1280x720. He said that he frequently saw larger resolution games in the forums and it would allow for crisper fonts down the road. The game seems to build in windowed mode, however when I try to run the game in fullscreen, we only get a black screen with nothing loading. We did some Display("Hi") functions for when the first scene loads, and they run when we run the game in windowed mode, but NOTHING loads in fullscreen.

Dave mentioned he has seen multiple larger resolution games in the forums over the years, and we are both curious what the solution to this is. I'm a little scared to build more of the game until I get the resolution issue resolved given how crucial it is to have resolution fixed early on.

Thanks all for help,

Jen
SMF spam blocked by CleanTalk