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

#61
For the sake of an argument, is it possible to make a game run in, lets say, 400 x 300 pixels?
#62
Thank you for the quick answer. Good to know that road's closed.
#63
Using AGS for a christmas surprise at work, I wonder if I can make AGS open a pdf file for the user?

I'm looking for a command that does something like opening the PDF file in the background, then quitting AGS so the PDF file is open and visible to the user when AGS closes.

Is this possible? I believe the function File.Open might not be what I'm looking for...?
#64
I asked one question and got two good answers.

Thanks folks :)
#65
All my buttons have grey background by default, and white and black outlines. I can't seem to change them into anything else other than by giving them an image. But this seems impractical when there are lots of buttons. Is there a way to make the background color of buttons white? And while we're at it, is there a way to change the outline of a button from the black and white lines into something else?
#66
That sure explained a lot. Thanks :)

I'll try it out in paint.net and see what I can do.
#67
Oh, this seems feasible but out of bounds of my pet project  :(

I cant recommend using a transparent GUI for this, it lacks behind after the mouse cursor. Also, I read a bit about dynamic sprites and that seems not possible either.

I'll have to think about it before I try to do this as a 32-bit game. Thanks for the advice!
#68
I want my mousemode "look" cursor to be a pair of glasses rather than the traditional eye. No problem. Now i'd like these glasses to have the effect of being semi-transparent, so the spectacle frame is solid while the glass pieces are semi-transparent. Somewhat like the effect of a semi-transparent GUI hovering over part of the screen.

Is this possible?

Perhaps something like a GUI placed wherever the mouse cursor is at a given time, done with rep_exec, but I dont know if this is the most practical solution.

Or perhaps the mouse cursor sprite can be made with a dynamic sprite?

What would you propose as the most feasible solution?
#69
Quote from: Mandle on Sun 25/10/2015 12:41:32
Yes, it's possible: Almost anything is in AGS...

What you need to do is have a Repeatedly Execute bit in your code that asks AGS to check on where the x and y locations of your character are:

Then: If either location goes "out of bounds" (like strays within the 10% boundary of the top, bottom, left, right edges of the playfield) then the camera recenters on the main chacters...(The exact command is something like: CameraViewpoint or something but yeah, not exactly that...it's in the manual)

Best of luck with your project! :)

Can't find any function called CameraViewpoint, so I bet we're talking about SetViewport   ;)
But this was my original intention, only I thought I'd go ahead and see if anyone had a mod that did this already.

Still, I need to figure out how to turn off AGS scrolling ???

And where do I find this smooth mod, it sounds interesting?
#70
Still toying with the player walking across the large map.

But I find the scrolling feature is a bit hard on the eyes. Are there alternatives? Like instead of scrolling, the screens viewport centering on player character whenever player character walks far enoug away from the last place it centered on.

If any of you remember these games, I liked the way this worked in Dark Sun, but Ultima VII was too stringent in having the camera follow the character excatly.

Is there perhaps a mod for this?

I could probably write some function on my own, but I would still need to turn of the default scrolling. Is this possible?


#71
Changing the sprites' settings worked. Thank you for this solution.

It seems all default sprites and imported character sprites are set at 320x200 by default. New sprites are at game's set resolution.
#72
I'm toying with importing a really large background, its a map that the player character can then walk around on. Scrolling happens.

I'd like game's resolution at 640x400.

Map is 1600x1200.

For starters, I just use the games normal game template.

Here comes what I dont understand: when running the compiled game, map is shown at 640x400 resolution (as far a my eye can see), but player character is shown at 320x200.

I would have expected player character to become smaller, half the height and half the width. Why doesn't that happen? Now I have a 320x200 pixel person walking around on a 640x400 pixel background.
Oh, ans the GUI's too, the actual GUI on top of the screen has become smaller but the pictures on said GUI are still looking like size 320x200.

I don't get it?

#73
Wait, I just found out about SCI Studio.
I'll try and recreate the font from scratch, that oughta do it.
#74
Well shoot, I imported a font and now the text on all labels and all buttons are off by half an inch.

Might be because the font is imported at size 16, and the actual letters in the font are only something like 8 pixels high, so the top 8 pixels of each letter are invisible. And so, when putting words on a label thats 12 pixels high, theres not enough room on the label to show the letters. But if I import the font at anything less than size 16, then the letters of the font get downsized.

How to get a size 16 font with letters 8 pixels tall to fit into a label 10 pixels tall?
#75
But the manual says to use "== 1" and here I went and thought I had it   :~(


I shouldn't go and read such stuff :-\





(Just kidding, thank you for this point, Khris)
#76
This works a treat   :)
At the time only for LookAt, but it should be easy to extend to other interactions. Also, I have a bit of trouble with my inventory items, I'll have to figure out a way to "turn it off" when viewing inventory, but that should be a piece of cake.

And so simple. I like simple   :)

Code: ags

  if (IsInteractionAvailable(mouse.x,mouse.y, eModeLookat) == 1)
  {
    if (mouse.Mode != eModeLookat)
    {
      mouse.Mode = eModeLookat;
    }
  }
  else if (mouse.Mode != eModeWalkto)
  {
    mouse.Mode = eModeWalkto;
  }    
#77
Wait, sorry for taking your time all, I think what I'm looking for is included in IsInteractionAvailable, which I've just found out about. I'll have to check it out and see if it works as well as I suspect  ;)

And thank you, Snarky, for your quick and helpful reply.
#78
Thank you for that too, Khris. I was wondering how to avoid clashes with active inventory items, your solution will solve that.

But another idea popped up: Can I use custom properties of hotspots to determine which cursor should be applicable to that hotspot? The ideal result would be to have one hotspot, with custom property "1", activate the eye cursor, and another hotspot, with custom property "2", activate the hand cursor. In order to make this work on game level, I figure I would have to use properties. But I lack for the words to put into AGS to let it know whe're looking for properties.

Let's say I make a custom property called CursorProperty (number type). And then something along the lines of:
Code: ags

 if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == "HotspotHasProperty1")
    {
      mouse.Mode = eModeLookat;
    }
 else if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == "HotspotHasProperty2")
    {
      mouse.Mode = eModeInteract;
    }


#79
Tested and working. Thank you slasher  ;)

Code: ags



function room_RepExec()
{

  if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hotspot[1])
  {
    if (mouse.Mode != eModeLookat)
    {
      mouse.Mode = eModeLookat;
    }
  }
  else if (mouse.Mode != eModeWalkto)
  {
    mouse.Mode = eModeWalkto;
  }    

}
#80
Then again, perhaps I could simply use an "if" statement to determine if the cursor is still on the hotspot, and only "if" this is no longer true should it return to default. I'll try it out.

SMF spam blocked by CleanTalk