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

#3421
Quote from: flamingdog on Fri 23/09/2005 07:32:08
In the game I'm currently working on, I'm trying to give at least one unique statement for every possible object/hotspot interaction... It's proving to be the biggest ballache of the whole process, but one of the most fun at the same time. I'm aiming to try and show something of the character, the world, the plot, through the things that are said, chiefly.

My experience is that it is much harder to do if you want to have serious responses, rather than jokey ones. Jokey ones are much easier. In the Awakening of the Sphinx demo, during dialogues you could click on topic icons, inventory items or anything in the background and talk about it. This gave huge flexibility to the game player but made writing all the responses such a pain! It took ages, and some of them are probabyl pretty rubbsih. If you then also add the capability to have one response on first click, another on second click, etc. Then you have an enourmous task.
#3422
Well, if you can tell me how to wait 2.3 game cycles, I'll do it. I call it delay rather than speed, because it is the number of cycles between pixel movements.
#3423
The normal download now includes the source for a demo game. Demo game requires 2.72beta7 but the module should work with AGS v2.71 or later. Version 1.19 now makes translations work properly (which 1.18 failed at).

Credits module.

I never used the Creditz plugin, but I read the help file and tried to match its functionality.

Where n is credit seuqence number, staring with 0
//   Credit[n].AddTitle(const string t, optional int x, optional int font, optional int colour)
//   Credit[n].AddCredit(const string t, optional int x, optional int font, optional int colour);
//   Credit[n].AddImage(int sprite, optional int x, optional int valign)
//   Credit[n].Run();
//   Credit[n].Pause();
//   Credit[n].Stop();
//   Credit[n].IsRunning();

Example:

Code: ags

Credits[0].DefaultCreditFont=3;
Credits[0].DefaultTitleFont=3;
Credits[0].DefaultTitleColour=65000;
Credits[0].DefaultCreditColour=15;
Credits[0].Delay=1;

Credits[0].AddTitle("Scripting by");
Credits[0].AddCredit("SSH");
Credits[0].AddImage(12, eCreditCentred, eCreditAlignBelow);
Credits[0].AddTitle("ScrollingCredit Module by");
Credits[0].AddCredit("SSH again!");
Credits[0].Run();


Have fun!

Download Credits module here (Requires AGS v2.71!)
View Full instructions
#3424
Quote from: Rui "Brisby" Pires (a Furry) on Thu 22/09/2005 12:13:31
I know I already addressed the issue of not being a way to get a character's name in a string (it currently returns a [200] char), but I'd like to bring it up again. It's relevant because it's probably the only thing not "Stringasized", and it is one that is preventing me from updating my script. Well, I can update most of it, but I'd like to update all of it...

Actually, there's quite a few builtin functions that don't work with Strings when they could.

Quote from: Snarky on Wed 21/09/2005 14:46:36
I haven't tried this, but couldn't you just write s instead of this.s? That's how it works in Java, at least.
No, you just get an error. AGS script isn't Java!
#3426
Well, not necessarily. If you click on a file then shift-click to select a whole bunch of others, you can end up with the last file listed first, etc.

Also, doing 001, 002 is a pian if you originallo=y only planned to have 8 srpites, but added more later: renaming 8 files is a pain.
#3427
It would be nice if multiple sprite import had an option to automatically order the imported sprites in the same order as any numeric value in the filenames, i.e.

spr1.png, spr2.png, spr3.png, spr4.png, spr5.png, spr6.png, spr7.png, spr8.png, spr9.png, spr10.png, spr11.png, spr12.png

As it is, if you just click on them all, they can get imported in the wrong order.

Also be nice if you could select multiple sprites and export them with an auto-numbering (based on ags sprite number?)
#3428
While we're on documentation... it's flippin hard to find out how to do optional arguments in your own code. Eventauilly,  found:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20582.msg260629#msg260629

but this should go in Manual, and In strazer's tidbits!
#3429
If you like waterfalls, I'd recommend going to see La Monesteria del Piedra just off N11 Madrid-Zaragoza. It's really beautiful: http://www.coloredhome.com/Monasterio%20de%20Piedra/Monasterio_de_Piedra.htm

In Italy, Venice is incredible, but I've only really been there, Verona, and Catania

Interrail cards vary in price according to the countries you go to. When I did it, I went round Germany, Poland, Czech Repulbic, Hungary, Austria and Switzerland
#3430
I might do a 3d remake of Pixel Hunt, given that my 3d modelling abilities should just about manage the GFX for that  ;)
#3431
OK, good old built-in cEgo.Walk doesn't go very slow. Amaze your firends with your snail-like pace on both objects and characters:

Download here (Requires AGS v2.71!)
Mirror

--
Edit by strazer: Not needed anymore since AGS v2.72 Beta 3:
* Added ability to use movement speeds slower than 1 (-2 is now 1/2, -3 is 1/3, etc)
--

There are two functions:

slowmove.obj(Object *o, int x, int y, int delay, optional BlockingStyle)

Moves an object from current position to x,y with delay game cycles between each pixel moved

slowmove.cha(Character *c, int x, int y, int delay, optional BlockingStyle)

Moves a character from current position to x,y with delay game cycles between each pixel moved

Default blocking style for both functions is non-blocking

Have fun!

EDIT: Fixed small buglets, documentation, added blocking option and we have version 1.1
#3432
Those that don't understand the concepts of scope, garbage collection and so on might have trouble understanding why this code doesn't do anything in AGS 2.7 and later. I post this so people can understand the problem, and is there anythign we cna do to help people not do this by mistake?

With old AGS overlays you had to create them and then get rid of them (unless you used DisplaySpeechBackground that got rid of them for you after a bit). However, if you do this:

if (myvar == 2) {
  Overlay* testOverlay = Overlay.CreateTextual(50,50,120,2,15,"This is a text overlay");
}

You will probably not see your overlay at all. Why? becuase the Overlay you create is a manged type and automatically garbage collected when the testOverlay variable goes out of scope: i.e. when you reach the closing brace "}" within which the variable was declared. So the overlay is created and destroyed almost instantly.

Instead, do:

Overlay* testOverlay;
if (myvar == 2) {
  testOverlay = Overlay.CreateTextual(50,50,120,2,15,"This is a text overlay");
}

except, of course, if this is inside a function. The safest thing to do is only declare Overlay *s outside ANY function. That way it will stay in scope all the time.


I just helped a friend (who will remain anonymous) sort out this problem on #ags, so its already happenign and I can just see lots of questions like this occuring.
#3433
Lazarus, you should have said that you got your template uploaded to http://www.lumpcity.co.uk/~skimbleshanks/templates/MI2v2.7.zip;D

Thanks for the work. Maybe a mod can update the title of the first post now!
#3434
Quote from: Scorpiorus on Tue 20/09/2005 13:39:14
ps. By the way what AGS version do you have, 2.7? I'm going to sort out that timing problem with DisplaySpeechQ_RE and also update it to use object-oriented scripting and script module support. Those two require AGS v2.7 or higher of course.

Since script modules can have their own repeatedly_execute, you don't need to bother fixing that timing thing: the user never need know about that _RE function at all!  ;D
#3435
I've been trying to do this:

Code: ags

struct slowmove_t extends slowmove {
  int x0, y0, x1, y1;
  int dx, dy;
  int stepx, stepy;
  int delay;
  int timer;
  int fraction;
  Object *o;
  Character *c;
  
  import static function find_free();
  import function setup(Object *o, Character *c, int x, int y, int delay);
  import function move();
  import function update();
};

slowmove_t slowmove_i[MAX_SLOWMOVES];

function slowmove_t::setup(Object *o, Character *c, int x, int y, int delay) {
  this.o = o; /// AGS BARFS HERE!
 // etc....
} 


And AGS says: "Error (line 31): Nested non-property pointers not supported".

I'm not nesting anything, I just want to assign, say, slowmove_i[0].o = o; by doing slowmove_i.setup(o, ...);

EDIT:
Well, OK, this is a pointer, as is this.o Ah well, I worked around it, albeit a little inelegantly. Maybe there could be a bit more explanation in the error message.

While we're on dodgy error messages, if I accidentally refer to the type of a struct array instead of the array itself, I get the unhelpful message:

Code: ags

slowmove_t[i]....

"Variable '[' already defined"

when it should say:

"I pity da fool that thinks slowmove_t is an array"


EDIT 2:

Actually, if you have a String inside a struct, say called s, you can never do this.s, because this and s are both pointers and you get that error I mentioned earlier. This rather restricts the "strings in structs" feature! It also means that although you cn declare protected Strings in a struct, you cannot actually access them!

Edit by strazer

AGS v2.71 RC 1:
* The "this" pointer can now access pointer members in its struct.
#3436
Quote from: Scummbuddy on Tue 20/09/2005 01:05:05
Also, it seems to me, as from your first post that you are not a native english speaker.

Well, he is from liverpool  :=

Quote
If you would like, go ahead and write what language you noramally use, and if someone spots it, and also knows it, perhaps you two could private message each other through some means to get your ideas out easier. Just please don't write non-english threads in these forums, without translations. We're trying to keep this an english board. Not to be jerks, but just for consistency.

Ummm, sorry Scummy, but where have either Ashen or MEHRDAD posted non-english posts?


And you can rename rooms to reorder them, so it is possible, although a bit risky. But as you both have said, you can just get your guy starting in room 200 and make room 200 have your logo, then it jumps to room 1
#3437
Some hints on making this a module:

Modules can have their own repeatedly_execute_always functions, so just make up one in the module with that code in it.

Use meaningful names for variables rather than anonymous globalints. As they are all internal to the module, you don't need to worry about export/import for them

Timers can be replicated by decrementing a global integer in a repeatedly_execute(_always). This means that the normal timers are free for anyone to use elsewhere and you don't need to keep track of them orwarn people in your documentation.

so something like:

Code: ags

enum fade_state_t {eStateFadeAllOff, eStateFadeIn, eStateFadeWait, eStateFadeOut };
fade_state_t fade_state=eStateFadeAllOff;
int fade_anim_timer=-1;
int fade_delay_timer=-1;
int trans;

function FadeName (const string areaname, int disptime) {
  displaytime = disptime;
  fade_state=eStateFadeIn;
  gTownname.Centre();
  gTownnameborder.Centre();
  gTownname.Y-=50;
  gTownnameborder.Y-=50;
  SetLabelText(gTownname.ID, 1, areaname); // ideally a nice GUI object name here
  gTownname.Transparency = 100;
  SetButtonPic(gTownnameborder.ID, 0, 1, 0); // ideally a nice GUI object name here
  gTownnameborder.Visible=1;
  gTownname.Visible=1;
  AnimateButton(gTownnameborder.ID, 0, 35, 2, 2, 0);// ideally a nice GUI object name here
  fade_anim_timer=30;
  trans=100;
}
export FadeName;

repeatedly_execute_always () {
  /////////////////// NAME FADE ////////////////////////
  if ((trans==0) && (fade_state==eStateFadeIn)) { //WORD COMPLETELY VISIBLE
      fade_delay_timer = displaytime;
      fade_state=eStateFadeWait;
  }
  else if ((fade_delay_timer == 0) && (fade_state==eStateFadeWait)) { // Begin fadeout
    fade_state=eStateFadeOut;
  }
  else if ((trans==100) && (fade_state==eStateFadeOut)) { //WORD COMPLETELY INVISIBLE
      gTownname.Visible=0;
      AnimateButton(37, 0, 35, 3, 2, 0);// ideally a nice GUI object name here
      fade_anim_timer = 30;
  }
  else if ((fade_anim_timer==0) && (fade_state==eStateFadeOut)) {
      gTownnameborder.Visible=0;
      fade_state=eStateFadeAllOff;
  } 
  else { //FADING IN OR OUT
      if ((fade_state==eStateFadeIn) && (fade_anim_timer<=0)) trans--;
      else if (fade_state==eStateFadeOut) trans++;
      gTownname.Transparency = trans;
  }

  // Update timers
  if (fade_anim_timer >= 0) fade_anim_timer--;
  if (fade_delay_timer >= 0) fade_delay_timer--;
}


and module header:
Code: ags

import function FadeName(const string areaname, int disptime);



#3438
General Discussion / Re: Real life game
Tue 20/09/2005 09:59:30
Make sure you don't get fined for littering or fly posting

EDIT:
Actually, I think people will be cynical and suspect that you are selling something or runnign a pyramid scheme. That's what most of the little unofficial card you find stuck to lamposts here are: "EARN 50k a year AT HOME" they proclaim.

Of course, since these schemes do actually attract people, you wil get some interest, but then it will be from the type of peopel who buy from Spam and enter pyramid schemes: do you really want their hits to your sire? Unless you ARE actually planning a pyramid-selling penis-extension scheme!
#3439
Quote from: Vince Twelve on Mon 19/09/2005 13:48:25
Yarrr.  Why this be only on one day?  Me mates and I talk like this all the time, as his noodleness commands.

Yaaaarrrr!

I didn't know that ye be from Somerset, Vince of the Twelve! Keep secrets from me again, and you'll taste a lick of the cat!
#3440
Muy bien!

I am looking forward to this. The art is great, love your style.

SMF spam blocked by CleanTalk