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 - 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
This was INCREDIBLY helpful, thank you! :-D
#3
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
#4
Downloaded that file, and also did a maintenance update on my display drivers.

Direct3d works and loads, even in the bigger resolution, in windowed mode. I still can't get any size game to work on my computer in full screen mode.

At this point, it just looks like I'll be testing in windowed mode and if I need to do work in fullscreen, I'll have to move the build to a different computer?

It's just so bizarre.
#5
In the Display and Render sections of DxDiag, it shows both directdraw and direct3d as enabled.

At this point, we've figured out that my computer just doesn't show ANY AGS game in fullscreen, period, in direct3d mode. Even though direct3d is enabled according to the dxdiag.

Any other ideas?
#6
It's Windows 10. I have an Asus 2 in 1 laptop, 15.6" screen.

I just made a smaller resolution test game, which loads while windowed, but when I tried to play the smaller resolution at fullscreen, it STILL wouldn't load. So it's clearly a problem with my computer and Direct3d drawing. I just checked my display adapters, and according to my computer, they are both up to date.

So, what's going on?
#7
So, the good news: It works in fullscreen in Direct Draw 5. The problem is, as Dave has telling me, Direct Draw is not great for developers since it's not supported on many computers nowadays and while it works for me, it won't work for many others.

That said, Dave just ran my game on his computer and it worked just fine, so now this appears to be an issue with my computer. Any idea on where to start with that? It's a recent machine, bought in january of this year, so it should be able to run.
#8
I'm running it in Direct3d
#9
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