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

#2761
Use run-script in the dialog, and then put this in your main script:

Code: ags

function dialog_request (int num) {
  int are = Random (3);
  if (num == 1) {
    if (are == 0) character[SOMEBODY].Say ("Hello");
    if (are == 1) character[SOMEBODY].Say ("bye");
    if (are == 2) character[SOMEBODY].Say ("greetz");
    if (are == 3) character[SOMEBODY].Say ("huh?");
  }
}




(edit) Heh. Turns out you can't name a variable "R" in a code block without having it renamed "are"...
#2762
Quote from: miguel on Fri 22/02/2008 21:21:50
A nice puzzle would be:

I disagree that this would be a nice puzzle. Depending on the player's background, it is either way too difficult, or a cliche.
#2763
Certainly.

The easiest way is probably to do a parallax - make three background layers, the front two of which are mostly transparent (except for the stars) and scroll them in the background at different speeds. That'd give you a spacey effect.

Oh wait, that "exploding inward" screensaver? Ah, that's a particle engine, definitely. The trick lies in enlarging (and speeding up) the particles as they live longer.
#2764
Quote from: JimmyD on Thu 21/02/2008 13:55:24
am I correct in thinking that I can substitute character[EGO] for "player"?

Yes.
#2765
General Discussion / Re: lycos web
Thu 21/02/2008 15:56:37
The relevant number these days is not storage space, but bandwidth.
#2766
An easy way to do it is this:

In the sprite editor, use the "change sprite number" function to modify the number of each "cursor" item to be equal to the number of the "shadow" item + 1000. So we get sprite 578 = key with shadow, sprite 1578 = key with cursor. Etc.

Now go to the code for selecting items, and add a line that says ChangeCursorGraphic (item[selected].Graphic + 1000).
#2767
Make sure you're using the same set of read and write functions.

One does binary data; the other does an AGS-specific format. You want to not mix them up.

Also, "if (x) { } else if (not x) { }" is redundant. And also also, if fmark == null, then fmark.Close() is apt to fail.
#2768
You store the original position in the on_mouse_click () function,

Code: ags

int orig_x, orig_y;
function on_mouse_click (MouseButton button) {
  if (GetCursorMode () == eModeWalkto) {
    orig_x = character[EGO].x;
    orig_y = character[EGO].y;
  }
}


And you calculate the difference in here:
Code: ags

function repeatedly_execute () {
  int dx = character[EGO].x - orig_x;
  int dy = character[EGO].y - orig_y;
  int distance = Maths.Sqrt (dx * dx + dy * dy);
  if (distance > 40) {
    Display ("ouch!");
  }
}
#2769
Use the run_script option in the dialog script to ensure the room change happens at the end of the dialog.
#2770
I'm curious though... that pushing-the-key-out with a piece of paper under the door - has anyone ever done that in real life? I mean, does that even work, at all?
#2771
Ah.

If that was the idea, I'd go with no characters at all, but simply building the screen with rawdraws.

Since the playing area appears to be a simple matrix, doing your own pathfinding isn't going to be all that hard.

Looks interesting, btw. I like puzzle games.
#2772
Another would be to store the position of the character when he starts moving, and in repeatedly_execute calculate the distance from there to his current position.
#2773
Quote from: SSH on Tue 19/02/2008 17:50:09
Which ones isn't it great to win? ;)

That one that we had a big row over last year :)
#2774
On behalf of the entire team, I wish to thank everybody who voted for us in the AGS awards. It's really great to win some of those :)
#2775
If you're doing rawdraws rather than characters, you'd have to do your own collision and pathfinding as well, which is not really recommended.

What exactly are you trying to accomplish?
#2776
Ah yes. While I don't recall trying it with Kyrandia itself, I do know that similar games tend to get problematic if you stack too many items in the same area. I've been known to crash RPGs through stockpiling, and did you know it was possible to overload Descent 2 to the point where you can no longer fire your gun?

Come to think of, I believe Kyrandia 1 has only a couple dozen inventory items, so this would stay well within a limit of 50.
#2777
Using only one cursor is easy. Just remove the bit in the standard game template that does "SetNextCursor" upon a right mouse click.

Using Kyrandish objects, somewhat less so; I'd not recommend that for someone's first game.
#2778
An easy way of determining it is this:

Code: ags

  int i, roomcount;
  while (i < 300) {
     if (HasPlayerBeenInRoom (i)) roomcount ++;
     i ++;
  }



Of course, that doesn't count all rooms, but it does count the relevant ones.
#2779
I don't know them by name since I tend to use GUIs for this. But I was referring to the difference between cdecl, stdcall and fastcall. See http://en.wikipedia.org/wiki/Fastcall
#2780
Likewise, thanks to everybody who participated! Four awards, w00t!


Quote from: SSH on Sun 17/02/2008 01:42:34
Remind me to have a separate voice acting category next year. And an AGS resource category.
According to these definitions (which appear to be a bit outdated and still list the p3n1s too), the Best Sound award includes voice acting.
SMF spam blocked by CleanTalk