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

#2661
I'll let Ashen take it from here - I think this thread should serve as an example to people that you shouldn't try to help out with code unless you're actually able to test it yourself before posting it :)
#2662
Ok, redid the string code with old style strings. I didn't have the old manual here so I couldn't check, but I believe that StrCat is the right command to append text.
#2663
Ok, that is a 2.70 thing I think. When were new Strings fully implemented? It shouldn't be hard to change it to old style strings.
#2664
True Ashen. So have we established that hour++ is line 26?
#2665
Quote from: m0ds on Fri 23/09/2005 00:10:05
GarageGothic, thanks for your help! I'm getting an error at line 26 saying an ; is expected, but I've put one in and it didn't seem to help it. Any suggestions?

Which one is line 26?

Edit: Ah yes, thanks for spotting the typo Ashen!
#2666
Quote from: SteveMcCrea on Thu 22/09/2005 23:12:12
He said 1 minute (real) == 10 minutes (game), i.e. 6 seconds == 1 minute, so I'd change the ">= 400" to ">= 6*GetGameSpeed()".

Sorry, I read it as 10 minutes = 1 hour (not sure that my calculation was even correct for that). And yeah yeah, I know that you should use GetGameSpeed() but why add to the confusion :)

Well spotted!
#2667
Edit 3: I updated the code with the fixes suggested by Ashen and SteveMcCrea. Thanks guys

This should be a simple Repeatedly_Execute function.

Since you want 1 minute real time = 10 minutes game time, it should be 10 times faster. Thus 6 real seconds equals 60 seconds (1 minute) of game time. As the default speed of AGS is 40 cycles per second, a game minute equals 40x6=240 cycles. To match possible other game speed settings, we'll do GetGameSpeed()x6 instead.


at top of global script:

Code: ags
int cyclecounter;
int minute;
int hour;
int ampm; //are we in the A.M. or P.M.


in repeatedly_execute (you might want to put this within other conditionals such as (if IsGamePaused() == 0)):

Code: ags

cyclecounter++;
if (cyclecounter >= (GetGameSpeed()*6)) {
Ã,  cyclecounter = 0;
Ã,  minute++;
Ã,  if (minute >= 60) {
Ã,  Ã,  minute = 0;
Ã,  Ã,  hour++;
Ã,  Ã,  if ((hour > 12) && (ampm == 0)) { //if past 12am
Ã,  Ã,  Ã,  hour = 1;
Ã,  Ã,  Ã,  ampm = 1;
Ã,  Ã,  Ã,  }
Ã,  Ã,  else if ((hour > 12) && (ampm == 1)) { //if past 12pm
Ã,  Ã,  Ã,  hour = 1;
Ã,  Ã,  Ã,  ampm = 0;
Ã,  Ã,  Ã,  }
Ã,  Ã, string timelabeltext;
   StrCopy(timelabeltext, "The time is: %02d:%02d", hour, minute);
Ã,  Ã, if (ampm == 0) StrCat(timelabeltext, " AM");
Ã,  Ã, else StrCat(timelabeltext, " PM");
Ã,  Ã, lblTimeDisplay.SetText(timelabeltext);
Ã,  Ã, }


Edit: I added the time display code now. Not sure if it will work since I haven't been using the new String functions myself yet.

Edit2: You should be able to check/set the variables hour, minute and ampm from other parts of the script to trigger events and decide what time to start it at.
#2668
Are the coordinates for DynamicSprite.CreateFromBackground room or screen coordinates? I can't seem to grab RawDrawn background art from outside the (0-320, 0-200) area? Also, will it ever be possible to RawDraw to background frames other than the one shown?
#2669
Oh yeah, just as I was ready to get working on the two Shadowplay tech demos again.
#2670
Quote from: [Cameron] on Wed 21/09/2005 11:09:09
I'd get David Lynch to write a game and helm the project with me. That'd make a really interesting game. Remember to look for the red lampshade.

Did you know that he'd already worked on a game project back in the late nineties?

QuoteDavid Lynch wanted a "conundrum thing... a beautiful kind of place to put yourself. You try to make a little bit of mystery and a bit of a story, but you want it to be able to bend back upon itself and get lost."
"It was called... Woodcutters from Fiery Ships... Ceratin events have happened in a bungalow which is behind another in Los Angeles. And then suddenly the woodcutters arrive and they take the man who we think has witnessed these events, and their ship is... uh, silver, like a 30`s kind of ship, and the fuel is logs. And they smoke pipes."

http://www.thecityofabsurdity.com/game.html
#2671
QuoteJust one question: I want to make a rpg with a female character. So I'm trying to figure out why should would go into a magical castle (with traps, moving doors, monsters and all). You see I don't see any reason, and I'd hate to put that she has to save the world or that kinda bullshit.

Put a loved one in peril. That always works - just watch "Beauty and the Beast" again. But you might want to put a twist on this. Remember "Labyrinth" where the girl wishes that her little brother would be taken by the goblin king, and exactly that happens?

Seriously though, you should first of all try to work out the theme of the story. What's the most valuable thing to the player character (family, freedom, friendship... or something else not starting with an "f"), and then put that at stake.

Edit: You might actually want to give the character a flaw, which ends her up in this situation. And if told within a traditional dramatic structure, her experiences in the castle will let her overcome this flaw. Maybe she's stubborn or greedy, or perhaps she's afraid of everything, fleeing into the castle only to find something much worse than what she was running from.
#2672
Use the command Character.SetAsPlayer().

if your characters' script names are Ego1 and Ego2, you can do:

cEgo2.SetAsPlayer();

and to return to the other one,

cEgo1.SetAsPlayer();

#2673
Wohoo, CJ you da man. I'll try it out right away. First, one more suggestion though:

Could we please have a DynamicSprite.Save(string filename) function? Having background-to-sprite and cropping functions would make this a very interesting option (such as having the player paint his own logo/portrait with RawDraw and then export it to a pcx file).
#2674
But it shouldn't be that hard to have texture animation, should it? After all the screen is redrawn every game cycle anyway, so you would just need to set up a timer function to determine which sprite to draw at which time. But of course it would require a lot of sprites.
#2675
Yes, this is certainly turning out to be an awesome 3D engine. Not quite Quake, but certainly Castle Master with optional Wolfenstein 3D areas :) I'm probably going to use the non-textured primitives for environment and then use textures for non-rotating sprites like signs etc.

Marvellous work from everybody involved.
#2676
This has been a really interesting thread to follow. To add my two cents, I always considered Dave the only "normal" guy in the group - although he is popular and does play football, he's not a sterotype like the others. Just look at the box cover. He's more of a Ferris Bueller or Marty McFly than he's like Emilio Estevez' jock character from Breakfast Club.

Also he shouldn't be too buff - after all he needs to use the excercise equipment to be able to open the garage door.
#2677
Quote from: Pumaman on Thu 15/09/2005 22:55:35
QuoteJust a quick question for CJ: Will any kind of sprite cropping (other than the current rotate crop) be implemented for 2.71? If not, I won't wait anymore to release my shadowbox-script.
Hopefully it will, yes, it's the next task I'm planning to do.

Awesome, thank you so much CJ. I hope I don't seem too greedy if I also remind you of this:

Quote from: Pumaman on Thu 16/06/2005 20:07:24
QuoteI wonder if it would be possible then, as a workaround, to add a function that changes the sprite number of a specific view frame at runtime? Such as SetFrameSprite(int view, int loop, int frame, int slot)?
I'll look into it.

Quote from: Pumaman on Thu 15/09/2005 22:55:35enums and bools are both 32-bit integer types.

LOL - here I thought I was saving memory by using bools instead of chars.
#2678
Should I really dignify this with an answer? Ok, first of all, notice the winking smiley - perhaps that means I'm not entirely serious about the suggestion?

Secondly, while the series as a whole is very episodic, PQ2 is driven entirely by the narrative of the Bains case. There are no random traffic stops or everyday drug busts (the only thing that comes close is the punk in the park). The subtitle of the game is The Vengeance, and that's exactly what it's about: Jesse Bains' revenge on those who testified against him. Everywhere you go in the game, you're following the trail of the Death Angel.

And no, shooting terrorists aboard airplanes isn't all in a days work for your average police officer.
#2679
Quote from: Sonny Bonds on Thu 15/09/2005 02:30:34
I also happen to think the hijacking scene should stay. The sewer scenes however, are something I'd miss like a hole in the head. Surely you could change the setting for the final showdown. (like Bains in a barricaded house or something)

Or accept the fact that the airplane scene was the dramatic high point of the game and let Bains be the hijacker! ;)
#2680
Don't forget two of the must-haves: Grave robbing and tombstones with funny/dirty limericks and rhymes.
SMF spam blocked by CleanTalk