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 - Crimson Wizard

#12921
@geork, you seem to like heavy programs :)
Code: ags

DynamicSprite *f = DynamicSprite.CreateFromExistingSprite(o.Graphic);
int Xfactor = f.Width;
int Yfactor = f.Height;


Shouldn't this be better?
Code: ags

int Xfactor = Game.SpriteWidth[o.Graphic];
int Xfactor = Game.SpriteHeight[o.Graphic];
#12922
Not completely sure, but possibly that's because you bound an non-existing function name with "On load" room event.

Check Room 1's events and see if there's a function room_Load in the list. Then open the Room 1's script and check if there's same function in there.
#12923
Erm, I suddenly realized my implementation is wrong. :P

What I do is checking Object's position, but object is a box at best, and it's not always represented by rectangular sprite.
#12924
I am afraid I don't fully comprehend the logic beyond truncation right away.
I can state the simple fact that on second iteration of while loop the string is being truncated to zero length.

- LetterOn = 0;
=== first iteration ===
- TextInProgress = Chars[LetterOn (that is 0)] + '|', that gives "h|"?
- LetterOn++, that gives LetterOn = 1
=== second iteration ===
- LetterOn = 1, > 0; TextInProgress = TextInProgress.Truncate(1 - 1 = 0); truncates TextInProgress to zero characters, deleting "h|"
#12925
Quote from: Andail on Wed 08/08/2012 10:37:46
Also wanted to share that it was impossible to run this on my laptop with Win 7 on it, until I changed the display resolution from 32 to 16.
Yeah, that's because the game requires to be run with DirectX 5 (my Windows changes color mode automatically though). One of the plugins (or both) used in this game does not support Direct3D 9 driver.

----
Ah, it seems that also requires to be run in compatibility with Win'98 mode to be able to save and reload. Probably only for some of non-latin locales.
#12926
Quote from manual:
Quote
IMPORTANT: The newly extended text is returned as a new string from this command. The original string will NOT be changed.

You should do:
Code: ags

TextInProgress = TextInProgress.AppendChar(TypeText.Chars[LetterOn]);


AGS strings are fixed strings as far as I know, they cannot change, only be assigned a new value.
#12927
Ah, well, if we are to use geork's code structure as an example:
Code: ags


Object *GetFirstFoundObjectInArea(int StartX, int StartY, int EndX, int EndY) {
   int index = 0;
   while (index < Room.ObjectCount)
   {
     Object *o = object[index];
     if (o.X >= StartX && o.X <= EndX &&
         o.Y >= StartY && o.Y <= EndY)
     {
       return o;
     }
     index++;
   }
   return null;
}
//Somewhere else
Object *o = GetFirstFoundObjectInArea(X, Y, X2, Y2);
if(o != null){
// there's some object
}


Still I wonder, do you need to find ANY object, or all of the objects? In the latter case this code won't work as-is.

EDIT: heh, noticed I did not make use of "o" variable in the loop, fixed the code a little.
#12928
General Discussion / Re: The scariest monster
Wed 08/08/2012 20:55:47
Quote from: Ascovel on Wed 08/08/2012 20:34:11
The zombies in Thief: The Dark Project.
+1. :) but that was probably because of their sounds rather than visuals (as everything else in Thief series).
#12929
If I understand correctly what you want to do, you may use GUI.GetAtScreenXY and GUIControl.GetAtScreenXY like:
Code: ags

GUI *found_gui = GUI.GetAtScreenXY(mouse.x,mouse.y);
if (found_gui != null)
{
   // hey, there's a gui under mouse!
}



Quote from: FeijotikusI hope that there is not an obvious answer to that but if there is, I will ask for a tutorial for finding things at the tutorial
Well, rule number one, don't look into tutorial, but rather in the manual. :)
If you meant "manual", since you are looking to work with GUIs, seek for GUI and GUIControl items in the manual's index (also GUIButton, GUILabel etc).
#12930
I guess since the number of objects in the room is usually less than number of pixels in the range, it would be simplier (and faster - runtime-wise) to iterate through objects array instead, like:

Code: ags

   int index = 0;
   while (index < Room.ObjectCount)
   {
     Object *o = object[index];
     if (object[index].X >= RANGE_X_MIN && object[index].X <= RANGE_X_MAX &&
         object[index].Y >= RANGE_Y_MIN && object[index].Y <= RANGE_Y_MAX)
     {
       return o;
     }
     index++;
   }
#12931
Quote from: NickyNyce on Wed 08/08/2012 17:26:35
Use the objects ID number instead of the name. Click on the object and see what number object it is.

object[?].Visible=true;

I have a feeling that's not really good way to do that, althought it may work in certain cases.
Problem is that the objects array is filled with the objects from current Room. If you start that dialog in different Room, objects will be different.
Ofcourse you may use this method if you are completely sure that character this dialog involves will never leave his Room, but in general this is a bad practice.

Probably using this is safer:
http://www.adventuregamestudio.co.uk/wiki/?title=Game_/_Global_functions#CallRoomScript
Or maybe there are other ways, which I am not aware of.
#12932
General Discussion / Re: The scariest monster
Wed 08/08/2012 14:48:37
Ah, sorry, I keep forgetting this discussion is primarily about visuals.
#12933
General Discussion / Re: The scariest monster
Wed 08/08/2012 14:26:45
Quote from: Shane 'ProgZmax' Stevens on Wed 08/08/2012 14:03:44
the more you see the monster the more desensitised you become to its presence, much like violence itself.  If you have to reveal the monster, save it for some pivotal moment in the story like the climax otherwise you've just got another Freddy Krueger or Jason Vorhees tramping about killing people by the dozen and camping it up.
I think there's still such factor as compassion (is this word correct in this context?) to characters. I saw a number of movies where you know who the "bad guy" or "bad monster" is for a quite a long time, and yet movie keeps you in tension because you worry about characters' fate.
(I don't mean dumb teenage movies where you feel no care about the 'cannon fodder'.)
#12934
Oh dear.
Time to replay all the series and recall what is it all about. ;)
#12935
General Discussion / Re: The scariest monster
Wed 08/08/2012 09:33:52
Here's the fairy tale I read when I was a child; according to their names I guess it was originally written and illustrated by Romanian authors. Because of artist's peculiar drawing style the pictures were terribly disturbing and scared me a lot.

Here's a page where I found all of those pics:
http://cat-arch-angel.livejournal.com/69482.html

Specifically, monster images:
http://ljplus.ru/img4/c/a/cat_arch_angel/_____4.jpg
http://ljplus.ru/img4/c/a/cat_arch_angel/__11.jpg
#12936
General Discussion / Re: The scariest monster
Wed 08/08/2012 08:59:23
Quote from: Calin Leafshade on Wed 08/08/2012 08:35:00
What gives the cenobites power is that they threaten to do the same to others that has been done to them.

There are different kinds of fear. Being afraid of monster's visage is one thing, being afraid of possible actions is other. Is there a reason why you want to focus the first type?
#12937
General Discussion / Re: The scariest monster
Tue 07/08/2012 21:43:16
Quote from: NickyNyce on Tue 07/08/2012 17:20:35
The Jackel from thirteen ghosts was cool
Are we talking of coolness, or of scaryness? I found many monsters "cool" but they weren't always really scary.

Quote from: abstauber on Tue 07/08/2012 13:42:23
I think it's mostly the mixture between the known and the grotesque.
Well, I won't probably say anything original if I tell that unknown can be frightening. Since "The Ring" was mentioned, I think most scary thing about the dead girl is that you don't know what's under her long hair :/. You have no idea what to expect precisely and so expect something terrible. The facial experessions of people killed by her make us to assume that they saw things beyond human imagination, something not the explainable (heh).

@Snarky: I hoped no one would do this... now you have seven days left.  (roll)



BTW.
In Soviet Russia children scare monsters.
http://www.youtube.com/watch?v=gj7SoDy4CQE
#12938
Ah, one more thing.
If something does not work properly in the template, it's probably worth telling to current template's maintainer.
You might post your problems here:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=32745.0
#12939
Quote from: Adrian on Tue 07/08/2012 14:54:10
I see what you're poining at. The way I understood the module, it's obligatory to have it set up upon the template,
The template includes its own VerbCoin module. That means that you don't need to add any other verb coin modules to it. That's the idea of using templates anyway: you just create a game and it's already usable.
#12940
General Discussion / Re: The scariest monster
Tue 07/08/2012 13:27:45
@abstauber, yeah thought about that one too :)

Actually, I once tried to analyze what makes monsters scary. I think that unnaturality (like eyes on hands and not on head) is one of the most important.
SMF spam blocked by CleanTalk