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

#1181
General Discussion / Re: Really freaking mad.
Thu 28/01/2010 13:08:12
Don't rule out the possibility that it was by mistake... if he copied & pasted code from his website to yours he may have accidentally moved the google adsense code as well...

But if it wasn't by mistake, he's a candidate for the biggest douche in the universe...
#1182
I've made a new version with some more options (controlling the "aspect ratio" & color of the lines), also opened a thread in the paint .net forum for it (link in the first post), so updates (if there will be any) will be from there...

Quote from: Dataflashsabot on Sun 24/01/2010 20:49:29
I was recently searching the web high and low for an easy way to do this. Thank you, thank you very much. :)
You're welcome, I'm happy you've found a use for it  :).

@CW: let me know if you have any problems with it (actually if you don't have any problems with it will be even better to know  ;) )...
#1183
Ahh, I see, off course you're right, mine are simply for reference...
#1184
Hey Steve, I was inspired by your perspective mode, so I wrote a plugin for paint .net that does the same thing...
If you're interested, details & download from here.
#1185
I was inspired by SteveMcCrea's AGSketch (view it
here
) and so I wrote a plugin for Paint .net (a free paint program which I love) which draws perspective lines on the selection you make...
It has the possibility of 1 or 2 vanishing points which you can then drag to your favorite location.

Download it from this paint .net forum thread.
Just put it in you paint .net effects folder (it's located in c:/Program Files/Paint .net/Effects on my computer) and then start the program. You will find the perspective lines under Render.
#1186
I think that's because the x & y of the player are in room co-ordinates, whereas GetAtScreenXY for hotspot is in screen co-ordinates.

Is your room a scrolling room?

If it is, try running instead of GetAtScreenXY(player.x,player.y) --> GetAtScreenXY(player.x + GetViewportX(), player.y + GetViewportY())
#1187
I don't know if there's a way.
As a workaround, though, if you don't find the key in the registry (if (key.GetValue("") == null)), you can ask the user to select the path via UI, and then save it to the registry yourself (or to xml which might be more safe)...
#1188
You should replace "AddHealth(player_health) + 1" to "AddHealth(1)" and replace "AddHealth(player_health) - 1 to "AddHealth(-1)".

What you did is adding 100 (player_health) to the width of the button on each key press ('W' or 'L', they both did the same)...

And btw, you should probably look at the Slider, I think it might be more suitable to act as a meter...
#1189
Unfortunately I'm out, there's no way I'll make it in time...   :'(
#1190
Well, I'm not sure that I fully understand the problem, but if you want only "idiot" to be the answer then you should replace
Code: ags

if (txtxwordy.Text.Contains(GetTranslation("idiot"))!=-1) {//If player says idiot.

with
Code: ags

if (txtxwordy.Text.CompareTo(GetTranslation("idiot"))==0) {//If player says idiot.
#1191
It did help...
Open your globalscript.asc, and search for a function called interface_click.
In there you'll see the two first lines:
Code: ags

input = txtParser.Text; // gets whatever was typed and stores it as the 'input' variable
  gParser.Visible = false; //Turns the GUI off.

After those lines the input variable will hold the text. There you should put if (ask_food) bit and cut&paste the rest of the function into the else bit.
Something like this:
Code: ags

// process user input
  if (ask_food) {
    if (input.CompareTo(fav_food) == 0) {
      // player entered the same food
      ask_food = false; // reset
    }
    else {
      Display("That's not what you told me last time...");
    }
  }
  else {

    //----------------------------------------------------------
    //THIS IS THE REST OF THE FUNCTION COPIED&PASTED
    //-----------------------------------------------------------

    //Our complex "it" feature.
  if (usedIt == 0) { //this just fixes a crash if the very first command contains "it".
    itWord = "a";
    usedIt = 1;
    }
  int result = input.Contains(" it");
  if (result == -1) { //if the players input does not contain "it"...
    int i = input.Length -1;
    while (i>=0){
      if (input.Chars[i]==' ') //...the game finds out where the last SPACE is, and...
      {
        itWord = input.Substring(i + 1, input.Length -(i+1)); //...the last word is saved as the 'itWord' String.
      }
      i--; 
  }}
  if (result != -1) { //But, if it DOES contain "it"...
    input = input.AppendChar(' ');
    input = input.Append(itWord); //...itWord is added. This way you can write "look apple", then "take it". Neat, huh? :)
}

  Parser.ParseText(input); //parses the 'input' variable through our list of known words
  
//Place all global parser commands here! :)
  if (Parser.Said("quit [game]")) { QuitGame(1); }
	else if (Parser.Said("save [game]")) { SaveGameDialog(); }
	else if (Parser.Said("load [game]")) { RestoreGameDialog();}
	else if (Parser.Said("restart [game]")) { gRestartgui.Visible= true; Mouse.Mode= eModePointer;}
  else if (Parser.SaidUnknownWord()) { // if an unknown word has been said
  Display("Please use another word for '%s'.", Parser.SaidUnknownWord()); // %s will be replaced with the unknown word and printed on screen
  }
  else if (Parser.Said("inv")) { ShowInv(); } //show inventory
  
  else if (Parser.Said("look key") && (player.InventoryQuantity[iKey.ID])) { 
    ShowInvCloseup(42, "This is the ugliest key you have ever seen."); //This shows a closeup of the inventory item Key when looked at.
                                                        // 42 is the number of the key sprite (not the meaning of life!).
  }
  
	else { //if none of the previous commands matched
  CallRoomScript(1); }// After checking the global script, the parser will go to the script of the current room. Add room-specific commands there!
}
  }
#1192
I don't know if there's a way to add a word to the parser in run-time, but I think that in the scenario you're describing you don't have to use the parser at all...
You can just compare the string in your global variable to the string in the textbox.
#1193
Congraltulations
Spoiler
Astauber
[close]
!!!

Without a doubt a deserved win...
#1194
General Discussion / Re: Awkward Awards
Wed 20/01/2010 20:57:14
Cool topic, Helme!

I'd like to nominate "The Energizer" for the best game named after a battery company...

I'd also like to nominate my nomination as the best nomination of a game named after a battery company.. ;D
#1195
Quote from: monkey_05_06 on Tue 19/01/2010 17:42:28
Do you mean Game.IgnoreUserInputAfterTextTimeoutMs (introduced in AGS 3.2 beta 1)?

Wow, that's exactly what I meant!! This makes me one happy peppy...

@Crimson: Thanks for the suggestion but with this new functionality I can stay with the default configuration...
#1196
Did this ever happen to you?
You're playing a game where dialog lines can be skipped with mouse clicks but also after some time (most of the games have this configuration).
Character1 is talking, you read it's dialog and click to go to the next line after you've finished reading. Unfortunately, a split second before that the time for the line was out and the line switched to the next one. Your click will then be misinterpreted for the new line and it will be skipped without you being able to read it, perhaps missing on some important clue or a nice joke...

Now, I think this can be avoided with some engine scripting if we'll accept the following logic as true:

If
The current line is being skipped by user click AND
The previous line was not skipped (**) AND
The time between when the previous line was finished and the user click was less than a split second(***) AND
This is the first user click skip for the current line

Then
Ignore the user click and don't skip the line

(**) Need this condition for a scenario of a user who has already read this dialog and is clicking like crazy to skip all lines...
(***) Need to test for a valid value, probably ~200ms...

Do you see any flaws in that?
#1197
As Khris wrote in his comment, tbInput is the scriptname of the TextBox.
That means you have to create a gui, put a textbox inside it, and in the textbox properties write "tbInput" in the script name.
#1198
Quote from: Chicky on Fri 15/01/2010 23:27:26
*edit* Ahh nuts, turns out i've got to go back to the studio to finish recording my bands album this week. That means like zero time to work on AGS. I don't think i'll be getting this finished in time guys!

It's too bad, the screenshot (and the fact you have videos) makes the game look very promising, I hope you'll still make it in time...

Anyways, here's a teaser for my entry:

#1199
This tutorial was really helpful, I've put it in my favorites....
If you'll ever feel like making a tutorial about how you did the character portraits in the game as well, I wouldn't complain.  ;)
Thanks, Astauber.
#1200
Quote from: Gilbet V7000a on Tue 12/01/2010 09:27:24
Because of this, my idea is like this:
F to lower E - 1 cup (worthless to try)
better E to D - 2 cups (try if you really want)
C - 3 cups (same as current 2-cup games)
B - 4 cups (same as current 3-cup games)
A - 5 cups (same as current 4-cup games)
A+ - still 5 cups, but with the cup graphics changed to gold or shiny or something like that (they can be just categorised as 'highly recommended' in the search filter)

I like this idea. It reminds me a bit of the rating system in the "home of the underdogs" where there is a picture of a dog next to the highly recommended games.
SMF spam blocked by CleanTalk