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

#1
Would a full screen animation really slow down the game?
#2
What I want to do is to fade out with background 0, and when the screen fades in again you see background 1.

One of the many codes I tried is:

  FadeOut(1);
  Wait(1);
  SetBackgroundFrame(1);
  Wait(1);
  FadeIn(1);

But sometimes during the fadeout, the background 1 jumps in. I've tried with longer waits and different  function order, but I never get the desired effect. Any idea?
#3
That world map reminds me of the one in Furries/Pac-in-time (don't know which game is original and which a hack or why the heck those games are the same with different characters), did you take it from there or got inspired by it? Not that It bothers me, it looks awesome, but just wondering
EDIT: this

#4
Quote from: zabnat on Mon 25/08/2008 06:32:56
You could use Character.IsCollidingWithChar function in rooms repeatedly execute to check if monster is colliding with player character. This isn't pixel perfect collisiondetectiong as it only checks if baselines are overlapping.

Wasn't there a perfect collision module by SSH?
EDIT: *cough*
#5
I've noticed that in 256 color games, the outline fonts are black, the default buttons are grey, etc, but if you modify the pallete, they still pick the same color indexes (and I had to adapt my pallete to that, otherwise the outlined fonts used wrong colors). There should be a way of telling AGS what indexes to use in these cases.
#6
What about a short list of the last 5~7 modifications that were made to the game you're actually editing?
#7
Wow, that's really psichodelic. I love it.
#8
Must a FLI/FLC movie use the game pallete in a 256-colour game?
I have to know this before starting to make one...
#9
Quote from: Sektor 13 on Tue 15/07/2008 20:03:08
Hey

I was wondering if (or how) it s possible to specifiy a GUI and only a button graphics for the engine too look.

I don't want to specify a exact button, but only the NORMAL GRAPHICS parameter !


I have a custom gui, and inventory slots will be actual buttons, as there are many inventory items available in random order to pick up (so button one can be a BUCKET, STICK, or anything else), i want to make script shorter, so i want for AGS to only look for specific button graphics not the button name.

hope this makes any sense :)

I don't understand what you are trying to say, but a button's graphics can be accessed through bButton.NormalGraphic, bButton.MouseOverGraphic and bButton.PushedGraphic. But, for inventory items, you don't have to make a lot of buttons. You can just draw a inventory window (the last button in the GUI toolbar, with a cup icon) and tell it to show the player's character (-1) or whoever you want. Then you can define each interaction for each item when clicking it on the inventory, and even tell AGS to manage then automatically (left click on use mode = select item, right click = look)

Anyway, if you want to cycle through all the buttons in a GUI and check its normal graphic, you can do this (let's imagine you want to check for the graphic 5):
Code: ags

int i = 0;
while (gYourGUI.Controls[i] != null)
{
     GUIControl *control = gYourGUI.Controls[i];
     if (control.AsButton != null)
         if (control.AsButton.Normalgraphic = 5)
               {
                //What to do if so
               }
     i++;
}

I'm not pretty sure this is 100% right
#10
Quote from: egamer on Sun 13/07/2008 18:35:44
I have one comment, though:  I've never played Lucas Arts games, so I've never used a Lucas Arts interface.  But I don't like the interface in your game as much as the standard Sierra interface.  The Sierra interface is more convenient to use, first, because you can right-click through the cursors, and, second, becuase it is easier to try an inventory item on more than one thing.  In your interface, to try an inventory item on more than one thing you have to click on "Use," click on the inventory item, and then click on the room each time you want to try to use the time.  In the standard Sierra interface you only have to go through that once, as the inventory cursor persists.  The same is true for the other cursors.  In your interface, the cursor reverts to "Walk" each time you use it.  Also. I like the graphic cursors better then the crosshairs with text at the bottom of the screen.
The LucasArts interface is like that (in old games, from Full Throttle the thing starts to change), because they didn't use different cursors for each mode, they rather treat the actions as a automatic text box, being default ALWAYS the default action if you try to use "nothing" or after finishing doing something.

Something that most LucasArts games had was quick access to the actions through keyboard. Pressing U for Use and that sort of things. I don't know if this game has it (haven't played it, honestly) but it's a good thing to be aware of.
#11
Yeah, doing a lot of views would save a lot of memory, considering the huge amount of sprites you can import. You could create global variables for each type of cloth (torso, helmet, pants, etc) for each character that will change clothes and then call a function to update clothes every time you update the variables. Then that function would change the views depending on each combination of clothes the character should wear.

----------------

Also, there's the character.followcharacter function. I still haven't seen it in action, so I dunno if it would look well, but it theoretically looks like it would do the trick, passing FOLLOW_EXACTLY as the distance and 0 as the eagerness.

Quote from: help fileThere is also another special use for this command. You can pass the special value FOLLOW_EXACTLY as the DIST parameter rather than passing a number. If you do this, then CHARID will always remain at exactly the same X and Y co-ordinates as CHARTOFOLLOW. This might be useful for effects such as a temporary halo over the character and so forth.

If you use FOLLOW_EXACTLY, then EAGERNESS has another meaning. If you pass 0, CHARID will be drawn in front of CHARTOFOLLOW; if you pass 1, it will be drawn behind.
So making non-clickable characters using the clothes' sprites and make them follow the character that wears it would do it. You would need as many characters for each cloth as characters that can wear it.
This would also allow you to make walking views for each cloth and so.

I dunno if FOLLOW_EXACTLY makes the following character look the same direction as the character it follows, but some facecharacter in the repeatedly_execute section would do the fix.
#12
Quote from: KhrisMUC on Sat 12/07/2008 17:25:53
He mentioned it: cSophie.

Baro:
You're using these lines:
Code: ags
cSophie.Walk(130, 50, eNoBlock, eWalkableAreas);
   cSou.Walk(70, 50, eNoBlock, eWalkableAreas);
   cBear.Walk(100, 50, eBlock, eWalkableAreas);
to make the three characters walk simultaneously. The thing is, when a cutscene is skipped, every command is executed in "zero" time. Obviously, a non-blocking walk isn't really compatible with this method.

You need to look which character reaches their destination last if the cutscene isn't skipped, then make their walk blocking. This should fix it.

it was cSophie, so made her block the script, and worked.
Thanks!
#13
I have this script assigned to a region's standing event

function region1_Standing()
{
if (!steppedregion1)
{
   StartCutscene(eSkipESCOnly);
   player.Walk(300, 205, eBlock, eWalkableAreas);
   player.FaceCharacter(cSophie, eBlock);
   cSophie.Say("Come on, Pol. There's no time to lose.");
   cSou.Say("Actually, acording to my calculus, we can have a delay of 20 minutes maximum.");
   cBear.Say("No need to waste time anyway.");
   cSophie.Walk(130, 50, eNoBlock, eWalkableAreas);
   cSou.Walk(70, 50, eNoBlock, eWalkableAreas);
   cBear.Walk(100, 50, eBlock, eWalkableAreas);
   cSophie.FaceLocation(100, 240);
   cSou.FaceLocation(100, 240);
   cBear.FaceLocation(100, 240); 
   steppedregion1 = true;
   EndCutscene();
}
}

But when I test it, one of the characters (cSophie) ends up in different positions depending on whether I skip the cutscene or not.


Without skipping the cutscente (what I want it to be)


Pressing ESC to skip the cutscene. See how the character (the girl in red jumper) is in a different position.

Both positions are walkable areas.

How do I fix this?

#14
Quote from: Mazoliin on Mon 07/07/2008 20:19:20
You could do this:

Set up a transparent gui with a label on it, and name the label something suitable.
Code: ags

//In the script header
import function LookInv(String invlook);

//In top of the global script
function LookInv(String invlook){
  lblSayInv.Text = "%s", invlook;
  gSayInv.Visible = true;
  SetTimer(1, ((invlook.Length/game.text_speed) + 1)*GetGameSpeed());
}

//repeatedly execute always
if (gSayInv.Visible == true){
  if (IsTimerExpired(1)){
    gSayInv.Visible = false;
  }
}

//In the "look" interaction of the inventory item
LookInv("Hey, this is what will be displayed");

But make sure that the labels gui has a higer Z than the inventory, so it will be placed in front of it.

While you were posting that, I got a similar idea. Made a transparent label control that uses speech font in the inventory guy, then made this function
Code: ags
function SayInventory (String message){
        SayLabel.Text = message;
        invsaytimer = 0;
        invsaytimermax = (message.Length * 4);
        }

(where invsaytimer and invsaytimermax are global ints)
invsaytimermax = (message.Length * 4) because approximattely I chronometred 1 second for 10 characters in a display command, but I'll try to use a timer as Mazoliin sugested.

then in repeatedly_execute, a timer

Code: ags
  if (SayLabel.Text != "")
      if (invsaytimer == invsaytimermax) {
        SayInventory("");
        }
      else {
      invsaytimer++;
  }


Just pasting here because it seems to work all fine. Then everytime I want a message to be displayed while on the inventory window, SayInventory (text_to_say).

Thanks everyone.
#15
Quote from: Akatosh on Mon 07/07/2008 16:55:08
This should do the trick:

Code: ags

//Put this in your inventory item's "look" interaction

gInventory.Visible=false; //The name of your inventory GUI
//If there are any other GUIs visible, too, repeat for them
Wait(1);
player.Say("It's a key!"); //The speech you want to be displayed
gInventory.Visible=true;

With that code, the inventory is not visible while the character is speaking.
Using saybackground and without the wait(1), the gui doesn't even blink - but now the text is visible only if the player is on certain parts of the screen so the text (lucasArts style) is not behind the inventory background.
Is there any combination of saybackground and sayat?
#16
I'm making an inventory GUI in the style of Sam&Max Hit the Road or Monkey Island 3. The gui is set as pop up modal. How do I display speech-style messages like in Monkey island 3 when you looked, etc at items? Whenever I use the say function the gui turns off and the game freezes while the character starts to speak, and when I use display, if display text as speech is on, it happens the same as say, and if it's off, the message is shown in the so-called "standard message box", which I don't know how to edit.
I want the message as if the main character was saying it. How do I do this?
#17
The story looks promising, and able to hold a lot of stuff to make a long game.
And the graphics are awesome, although you should try to put more than 2 kinds of mushrooms in that background, although maybe that's place horder too?
#18
Quote from: Dualnames on Fri 04/07/2008 21:01:48
Well, ok, let me be of more service to you.

Global script:
function mouse_click(Mousebutton *button) {
if (button==eMouseleft) {
ProcessClick(mouse.x,mouse.y,mouse.Mode);
}
}

//you want space to trigger left mouse click

function on_key_press(int keycode) {
if (keycode==32) {
ProcessClick(mouse.x,mouse.y,mouse.Mode);
}
}

Quote from: HELP FILEProcessClick
NOTE: This function ignores all interfaces and acts as though the point is directly visible. In other words, if the co-ordinates you pass happen to lie on a button on an interface, what actually happens will be as if the user clicked behind the interface onto the actual screen.

That's the problem, that what I wanted to do is actually click the GUI and notwhatever it's behind it.
However, I don't understand why it does click the GUIs when it actually loads on_mouse_click or processclick from an actual click from the actual mouse (although that's what it is supposed to do). That'd be the key to do this.
#19
Quote from: KhrisMUC on Fri 04/07/2008 15:24:44
 
Code: ags
  int move_by=5;
  int k=keycode-371;
  if (k>=0 && k<11 && k%4!=3) {
    mouse.y-=(k/4+1)*move_by;
    mouse.x+=(k%4-1)*move_by;
  }

  if (k==5) left_click();
  ...


Afaik, on_mouse_click isn't called if the mouse is over a clickable GUI. It's not possible to invoke a left click directly, you'll have to manually check what's at the mouse's location, going through GUIs minding their z-order & clickable property. I'm not sure if there's a way to call a button's OnClick that way, let alone clicking on the scroll buttons of listboxes and stuff like that.
After the GUIs are out of the way, it's fine to call on_mouse_click.

+: 43
-: 45
That code doesn't work (the maths are incorrect, mouse.x and y are readonly (although I tried to create two variables and didn't work either), and left_click() doesn't exist)

Quote from: Dualnames on Fri 04/07/2008 16:23:02
you whatever you put as on_mouse click
if (mousebutton==left) {
}

put it as mouse click left button.
That's the first thing I tried, but it's a processclick, so it still goes through the GUI.

Quote from: SSH on Fri 04/07/2008 16:17:37
Wouldn't it be easier to turn on Window's built-in accessibility controls that do the same thing?

Keycodes of typable characters can be easily done in script like this:

Code: ags

if (keycode=='+') { // do stuff }


How do I use those controls?


Anyway, if there's no way of clicking the GUIs manually, I could add more keyboard input. For example, for the main cursors GUI, 'L' changes to look mode and so on.
#20
I'm adding the choice of using the numeric keyboard as a mouse. 7, 8, 9, 4, 6, 1, 2 and 3 move the mouse in the 8 directions. 5 is processed as a left click and Enter as a right click.

(in the on_key_press function, which I moved after the on_mouse_clic section for token definition issues)
Code: ags
  if (keycode==372) mouse.SetPosition(mouse.x, mouse.y-5);   //8
  if (keycode==380) mouse.SetPosition(mouse.x, mouse.y+5);   //2
  if (keycode==375) mouse.SetPosition(mouse.x-5, mouse.y);   //4
  if (keycode==377) mouse.SetPosition(mouse.x+5, mouse.y);   //6
  if (keycode==371) mouse.SetPosition(mouse.x-5, mouse.y-5); //7
  if (keycode==373) mouse.SetPosition(mouse.x+5, mouse.y-5); //9
  if (keycode==379) mouse.SetPosition(mouse.x-5, mouse.y+5); //1
  if (keycode==381) mouse.SetPosition(mouse.x+5, mouse.y+5); //3
  if (keycode==376) on_mouse_click(eMouseLeft);              //5
  if (keycode==13)  on_mouse_click(eMouseRight);             //Enter


But when the mouse is over the GUI and I press 5 (left click), it detects it as if there were no GUI and I clicked on the background (i.e: the character walks to that spot even if mouse is over a button). When I actually click the GUI with the mouse, it processes it as a click on the GUI (nothing happens in background, buttons work, etc) since the GUI is set as clickable.
How do I make this artificial keyboard mouse actually click the GUI?

Also, I don't know if I'm going to add functionality to the mouse wheel, but if so, I'd use the - and + keys. What are their ASCII codes/where can I find a more complete list than the one in the help? (or I can only pass those in on_key_press?)
SMF spam blocked by CleanTalk