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

#2861
English has words for the abstract and the specific. So while "sad" is correct for someone mourning and someone dumped it is hardly the whole story. But that doesn't make it wrong.
#2862
As Gilbert says, you shouldn't really delete the sprite while the object still has it assigned
how about:

Code: ags

oReflection.Graphic=0;
if (DS!=null)
{
  DS.Delete();
}

ViewFrame *frame = Game.GetViewFrame(player.View, player.Loop, player.Frame);

DS=DynamicSprite.CreateFromExistingSprite(frame.Graphic);
DS.Resize(DS.Width*player.Scaling/100, DS.Height*player.Scaling/100);
DS.Flip(eFlipUpsideDown);
oReflection.Graphic=DS.Graphic;

#2863
General Discussion / Re: Scientology
Tue 28/03/2006 11:27:07
Talking of secret societies...
#2865
Advanced Technical Forum / Re: blocking script
Tue 28/03/2006 10:38:17
I think what you're missing is curly braces around the group of statements after the first if.
#2866
1: Use the queued Background Speech modules: look in the tech archive for these
2: You have to put something in the "player enters room before fadein" interaction to SetBackgroundFrame(0).
#2867
Code: ags

function SortNumbers(int a, int b, int c, int d, int e, int f) {
Ã,  int n[6];
Ã,  char nn[6];
Ã,  n[0]=a; n[1]=b; n[2]=c; n[3]=d; n[4]=e; n[5]=f;
 int i=0;
Ã,  while (i<6) {
Ã,  Ã,  nn[i]='a'+i;
Ã,  Ã,  i++;
Ã,  }

Ã,  int swap=1;
Ã,  while (swap) {
Ã, Ã,  Ã, swap=0;
Ã, Ã,  Ã, i=1;
Ã, Ã,  Ã, while (i<6) {
Ã,  Ã, Ã,  Ã, if (n[i] < n[i-1]) {
Ã,  Ã,  Ã, Ã,  Ã, int temp=n[i];
Ã,  Ã,  Ã,  Ã,  char temp2=nn[i];
Ã,  Ã,  Ã, Ã,  Ã, n[i]=n[i-1];
Ã,  Ã,  Ã, Ã,  Ã, n[i-1]=temp;
Ã,  Ã,  Ã,  Ã,  nn[i]=nn[i-1];
Ã,  Ã,  Ã,  Ã,  nn[i-1]=temp2;
Ã,  Ã,  Ã, Ã,  Ã, swap=1;
Ã,  Ã, Ã,  Ã, }
Ã,  Ã, Ã,  Ã, i++;
Ã, Ã,  Ã, }
Ã,  }
Ã,  i=0;
Ã,  while (i<6) {
Ã,  Ã,  Display("In position #%d, value %d was %c", i, n[i], nn[i]);
Ã,  Ã,  i++;
Ã,  }
}




As for the bitwsie things. Compare:

(binary values)

1000Ã, &  0001 = 0000
1000 && 0001 = 1
1000 |  0001 = 1001
1000 || 0001 = 1


The logical operators always deal with zero (false) and non-zero (true) and retunr 1 or 0. The bitwise ones do it on every bit individually. If you don't understand this, always use the logical ones.

#2868
Advanced Technical Forum / Re: blocking script
Mon 27/03/2006 15:22:28
Well, actually you probably can do it like that, but as soon as the first function retunrs non-zero, the rest will fail to execute.
#2869
You'd probably be best using one of the classic sorting algorithms, anyway (google for "sorting algorithms") bubble sort, selection sort, insertion sort. For 6 numbers, probably bubble sort is easiest:

Code: ags

function SortNumbers(int a, int b, int c, int d, int e, int f) {
int n[6];
n[0]=a; n[1]=b; n[2]=c; n[3]=d; n[4]=e; n[5]=f;
int i;
int swap=1;
while (swap) {
Ã,  swap=0;
Ã,  i=1;
Ã,  while (i<6) {
Ã,  Ã,  if (n[i] < n[i-1]) {
Ã,  Ã,  Ã,  int temp=n[i];
Ã,  Ã,  Ã,  n[i]=n[i-1];
Ã,  Ã,  Ã,  n[i-1]=temp;
Ã,  Ã,  Ã,  swap=1;
Ã,  Ã,  }
Ã,  Ã,  i++;
Ã,  }
}
Ã,  // Do something with result!
}



The logic of your bitwise operations is completely broken, I don't know why you think you can do it like that. The bitwsie operator is to do with binary logic, which if you don't know what it is then forget about it...
#2870
Quote from: KhrisMUC on Mon 27/03/2006 11:45:24
I was unable to see the cars cause there was a building site and a big container was standing right at the corner.
Or you were unable to see them becasue you should have stopped?
#2871
Quote from: kantor_98 on Mon 27/03/2006 11:28:08
It happen to me that the AGS editor "propose" something to me when I start editing, but it is not working. Ex:
Ã,  Ã,  Ã, region().enable=false did not work in 2.7.Ã,  I solve it with disableregion()

CAPITALISATION IS SIGNIFICANT

region[NUM].Enabled=false;

Quote
Ã,  Ã,  Ã, character[name] it is not working with name, but only with number of the character
Ã,  Ã,  Ã, character[2].Walk(355, 245,eBlock, eAnywhere) did not work. I solve it with character[2].AddWaypoint(355, 245)
The way you use names is, with EGO for example:

character[EGO].Walk
cEgo.Walk

Once again, note the capitalisation.

Quote
Ã,  Ã,  Ã, character[0].say("It is dark in there ! I cannot see anything !")
and I receive “say is not a public member of character”

Say, not say. Capitalisation. Oh, and RTFM.
#2872
Quote from: Radiant on Sat 25/03/2006 12:08:54
How about Trainspotting?

I don't think Trainspotting was ever supposed to represent England
#2873
osCommerce is a popular free Open Source ecommerce system for a website and can use paypal or your own CC handling, so it needn't be too hard if you know a bit of PHP.
#2874
Quote from: Pumaman on Tue 21/03/2006 19:46:48
QuoteThanks, I'll go re-import everything then and see if that works (or, if you plan on implementing an indicator some time soon, I'll wait for that).

Beta 6 will display the colour depth on the Room Settings pane, next to the Relative Size.


For my SpriteFonts module, it would be nice to know a Room's BG depth at runtime and act diffeently accordingly. Any chance of a room.color_depth to go alongside the system.color_depth?

#2875
Here's the code in SpriteFont. NB, with  the latest beta you can tell in the editor the bit depth of a BG. Still no way to tell in a game, I think, though...

Code: ags

DynamicSprite *SpriteFont::TextOnSprite(String t) {
  int x=0;
  int y=0;
  int w=this.GetSpriteTextRawWidth(t);
  int h=this.GetSpriteTextRawHeight(t);
  DynamicSprite *dspr;
  RawSaveScreen();
  if (system.color_depth==8) {
    RawClearScreen(0); // Col 0 is transparent
  } else {
    RawClearScreen(63519); // Pure Magenta is transparent colour
  }
  this.TextOnBackground(x, y, t, false, 0);
  dspr=DynamicSprite.CreateFromBackground(GetBackgroundFrame(),x,y,w,h);
  RawRestoreScreen();
  return dspr;
}
#2876
Actually, certain colours used as a background ARE already transparent, its just that this is undocumented! I use this in my SpriteFonts moudle. On an 8-bit background, I think it is colour 0. On 16-bit, its another one (Magenta, maybe),
#2877
I also think you needent bother but you COULD do this:

Grab screenshot as Dynamic sprite
Turn off all GUIs
Draw dynamic sprite onto background with RawDraw
Delete all dynamic sprites
Save
#2878
Hmmm, I thought I'd documented that the "Enforce new style Strings" checkbox in the General settings of the editor needed to be unchecked... sorry!
#2879
General Discussion / Re: I want to play an MMO
Thu 23/03/2006 11:42:38
For Low-tech ones that just need a simple browser try www.urbandead.com or www.kingdomofloathing.com
#2880
Quote from: Pumaman on Mon 20/03/2006 15:38:34
QuoteThis is a weird one... if you press then release the control key, then subsequently press escape, it will not trigger on_key_press.

That is a strange one, seems like it's something wierd with allegro, I'll have a look at it.

Sounds like Windows' StickyKeys to me
SMF spam blocked by CleanTalk