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

#5301
If it's not too much trouble I have two small feature requests.
I'd like to be able to set a background picture for a GUI slider, or at least change the color of its border (which now is always white and gray lines)
Also, it would be nice if you could set a background picture for a textbox GUI. This picture would have to be clipped or tiled to fit the textbox size.

Oh and I found one thing that may be a bug.
It appears that MoveToWalkableArea (EGO) doesn't work if EGO's coordinates are outside the screen. I have a script that moves EGO outside the screen when leaving a room (i.e. MoveCharacterStraight (EGO, 330, 100, 1); ) so this happens at times. Of course I can work around it with little problems but I thought I'd mention it.

By the way a fun quirk... in a largish game, check the usage for sprite #0 (the blue cup).

As to the nightmode I mentioned earlier, I'm currently using a 320x200 semi-transparent object that is blue. That works, of course, but I would still prefer RawClearScreen (bluish_color_number); RawDrawFrameTransparent (0, 50);

Anyway thanks for your time Pumaman! I love your work.
#5302
Ah, sorry if this wasn't clear from my earlier post.
I've found the variable "game.text_shadow_color" which changes the color of the 'shadow' outline around the text. So problem solved.
#5303
There is a function GetHotspotAt (x,y).
That should do it.
#5304
Beginners' Technical Questions / Re:Text width
Mon 22/03/2004 09:25:15
Simply write a function

Speak (int person, string text) {
  DisplaySpeechAt (character[person].x - 50, character[person].y - 20,
  100, person, text);
}

You'd have to add some checking to see if the x is close to either screen edge.
#5305
Then what exactly is your problem? Is your room image 320x240?
Or is your game actually set to 320x200 mode, with the movie-style black bars?
#5306
Fludge -> apparently it won't appear until you've had a barber shop treatment.

Jane -> yes you can enter your room, it's in the bottom right of the ship. Use cursor movement.
#5307
Just turn whatever GUI you're using off, and your room won't get cut off any more.
#5308
I'm not sure what menu you mean but you could use SetRestartPoint() when it's on screen, then a future RestartGame() will warp you to that point.
#5309
Well, that's what I'm doing now. But that requires adding a frame to each room where it's relevant (i.e. most of them); the RawDraw stuff could have been put in the global script with the on_event (ENTER_ROOM) function. So I thought I'd mention it.

Let's see, what else came up...
It would be nice if you could use a hotkey, say ^L or something, to edit the local (room) script (just as ^G and ^H edit the global one)

It would also be nice if the scriptnames of characters could be used in #defines, at least it seems intuitive to me (i.e. #define CallGuard character[GUARD].room = character[EGO].room )

Currently the right mouse button in the inventory triggers a 'look' action. I would like, as an alternative, to have it switch between the different icons available (look / touch / select) just like it does in the main screen.

Finally, when I load an invalid save game (i.e. from an earlier version of my game, or even an entirely different game) I get a critical error and the game crashes. Would it be possible for me to give a user-friendly error message instead, and have my game continue or restart rather than crash.
#5310
Let's see, that'd stop walk-tos entirely, but I can script something like
if CursorMode() == MODE_USE { moveCharacter (EGO, walkto.x, walkto.y) }   [sp?]

Right? Thanks!
#5311
I'm using DisplaySpeech (0, "hello"). (where 0 == EGO)
If conversation style is set to Sierra, the text is displayed in character 0's speech color, as it should be. If, however, I set it to 'sierra with background' then the text is displayed in black. Why?
Even worse, the text is displayed with a black shadow, thus everything appears boldfaced.
Oh by the way I'm using the textwindow GUI that comes with the demo quest template.
#5312
Can I prevent EGO from walking to a hotspot's walkto point in TALK mode? (after all, he can shout to the hotspot from a distance)

#5313
A few details I noticed that may have to be changed in a next version... none of this is really important though.

- Apparently, when deleting a GUI, its contents remain within the game. Its labels still show up when you do a text dump, and its sprites still cannot be deleted.

- When you try to delete a sprite that's in use on a GUI, you are told which button it is - but not on which GUI.

- If I (accidentally) use ctrl-F4 to get rid of the pop up window in the GUI section, clicking on any GUI item causes the editor to crash.

- Why can't I use RawDrawFrameTransparent with the current frame? There is a point to this. I wanted to implement a night mode with RawClearScreen (0); RawDrawFrameTransparent (0, 50);
#5314
One part of the bikini is at the bottom of the cruise ship's swimming pool.
The other part is on the beach west of where you get stranded; the first time there's an evil lady that you should not speak to; the second time there's a bikini part.
#5315
Strangely enough, my code works without any problems if I declare the string as a string. Whereas if I declare it as a character array, I cannot seem to initialize it with 'foo = "hello world" '.
#5316
Certainly. In your global script, find the function on_keypress () [sp?].
If you've started from the common template, this function will start with something like
Code: ags

if (IsGamePaused ()) return;


In front of this, add
Code: ags

if (IsGUIOn (My_GUI_1)) {
  if (keycode == 27) GUIOff (My_GUI_1); // escape key
  if (keycode == 13) ... // enter key
  // etc
}

#5317
Well, there's little to explain. It's just a basic concept of programming languages, and math.

If ran is a variable and is equal to 5, then we can use it in any expression and get the same result as if it were the number 5.
I.e. ran + 1 = 6, ran * 2 = 10 and so forth.
Similarly, SomeFunction (1, 2, 5) could be written as SomeFunction (ran - 4, (ran * 2) / 5, ran). Do the math.

Similarly, your list of
Code: ags

if ((GetGlobalInt(3)==01) && (notes == 4)){
int ran=Random(3);
...
if ((GetGlobalInt(3)==01) && (notes == 5)){
int ran=Random(4);
...
if ((GetGlobalInt(3)==01) && (notes == 6)){
int ran=Random(5);


can be concisely written as
Code: ags

if (GetGlobalInt(3)==01) {
int ran=Random(notes - 1);

#5318
Well, you could replace

Code: ags

int ran=Random(5);
if (ran==0) ListBoxSetSelected(0,6,0);
else if (ran==1) ListBoxSetSelected(0,6,1);
else if (ran==2) ListBoxSetSelected(0,6,2);
else if (ran==3) ListBoxSetSelected(0,6,3);
else if (ran==4) ListBoxSetSelected(0,6,4);
else ListBoxSetSelected(0,6,5);


with
Code: ags

ListBoxSeSelected (0, 6, Random (5));

#5319
This is not really a problem but I was curious as to what happened.

Code: ags

struct foo {
  string desc;
};
foo bar [5];


Now whenever I refer to 'StrLen (bar[0].desc)', the game crashes with an obscure error message. However if, at some earlier point, I set 'bar[0].desc = ""; ', there is no problem.
It seems to work with regular strings though, is this an AGS bug?
#5320
Hi there,

I'm using a Sierra-style GUI. In the inventory window, I have buttons for 'look', 'touch' and 'select'. These all work and set the cursor appropriately
Now I'd like to have the right mouse button switch between these three modes and cursors... but right-clicking on the inventory GUI box simply triggers a look action. Checking for MouseButtonDown (RIGHT)  [sp?] in the interface_click function doesn't seem to help...
any suggestions would be welcome.
SMF spam blocked by CleanTalk