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

#501
Crimson - I recall the gui was waaaay over to the right hand side for some reason (if I knew, I can't remember now), and you'll see the initial adjustment is minus 198, and when it's less than 50 on x, it's minus 90, which is a less amount than 198. Maybe that's what it was? I mean, if I hover the cursor on something to the edge of the left hand side of the screen (apart from the inventory cursor), the text gui has moved to the right.

Khris - Okay thanks I'll try again. Yeah x is still a declared variable somewhere else, which I cannot find. Oh, you put ) brackets near the end of lines 7 and 10 so I deleted those. I replaced x with Posx.

Okay, so I can get the game to run with Khris' code:

Code: ags
function repeatedly_execute()
{
  
  gOverhotspot.Visible = true;
  // calculate coordinates assuming for now that GUI doesn't have to be moved
  int Posx = mouse.x - 0; int Posy = mouse.y - 0;
  // horizontal check
  if (x < 0) Posx = 0;
  if (Posx + gOverhotspot.Width > System.ViewportWidth) Posx = System.ViewportWidth - gOverhotspot.Width;
  // vertical check
  if (y < 0) Posy = 0;
  if (Posy + gOverhotspot.Height > System.ViewportHeight) Posy = System.ViewportHeight - gOverhotspot.Height;
  // finally, actually move GUI there
  gOverhotspot.SetPosition(Posx, Posy);

}


I think I've messed up my @overhotspot@ properties. I'm going to start a new project and see what its width is for both the label and main gui. Perhaps when I changed my project's resolution from the default, I needed to change this too?
#502
Hey,

I think that my code makes the text move over to the sides when the mouse cursor reaches the co-ordinates I entered. Which it does. Except where I mentioned. I previously tried using ViewPortWidth, and while it looked a lot better, I could only make it work when the mouse was over something, not when the verb coin was displayed to select interactions. But your code looks different, so I gave it a try, but I can't get it to work.

First it said x is already defined, so I changed that to Posx, but then I get:

GlobalScript.asc(41): Error (line 41): Expected integer value after '='

If I remove the values and just have mouse.x, just to see what happens, I get a parser error on your line 2. However I'm not sure what is the variable and what is actually just a normal x for co-ordiantes?
#503
Okay folks, I didn't realise I had this problem until last night. I have some code in my global script that keeps the text on hotspots etc from dissappearing off the sides of the screen. However, when going to the inventory screen and clicking once on an inventory item and going back to the game, the hotspot text isn't affected by my code and goes off the screen. Is it not a part of gOverhotspot? If it's called something else, I should be able to add it to my script, but I don't know what it is.

It's important to note I am using the Scumm Verb Coin template.

Cheers!

Code: ags
function repeatedly_execute()
{


gOverhotspot.Visible = true;
gOverhotspot.SetPosition(mouse.x-198, mouse.y-90);
if (mouse.x<70) gOverhotspot.SetPosition(mouse.x-90, mouse.y-90);
if (mouse.x>540) gOverhotspot.SetPosition(mouse.x-260, mouse.y-90);

if (mouse.y<70){
if (mouse.x<50)
gOverhotspot.SetPosition(mouse.x-90, mouse.y+20);

if (mouse.y<70){
if (mouse.x>540)
gOverhotspot.SetPosition(mouse.x-260, mouse.y+20);

if (mouse.y<70){
if (mouse.x<540)
if (mouse.x>50)
gOverhotspot.SetPosition(mouse.x-198, mouse.y+20);

}
}
}
}
#504
I think anyone who can help will need more information.

What script commands have you used, and where?

What is the format of the song you are trying to play, and it's filename?

How long is the track? (In case it's so long AGS can't handle it, is that a thing??)

When you say music tracks, how many tracks are you trying to play at the same time?
#505
To be honest I had to watch it twice before I noticed it went slightly blurry! If anything I think you need to make it look even more pixelated otherwise like this it's not really making much of a difference other than reducing the quality a bit.

(Also I know it's not what you're asking, or if its something planned already, but with him being 3D, his lack of shadow hurts the game imo)
#506
General Discussion / Re: Where`s m0ds?
Tue 15/05/2018 19:46:48
Oh I see, blimey, just how old is AGS!?
#507
General Discussion / Re: Where`s m0ds?
Tue 15/05/2018 10:59:01
Ooh I joined 3 years later than you Andail! I remember learning about AGS through a short lived magazine about making games, and it had a big feature on AGS and a tutorial, and I was extremely excited to get my hands on it. It's possible I didn't even have the internet, or even a PC, to use it yet.. wow was that why I bought a PC, gosh I think it was.
#509
General Discussion / Re: Where`s m0ds?
Mon 14/05/2018 20:57:57
I'm no longer friends with him on Facebook (Might have been for a strong difference in political views, but that's irrelevant) but looking up his profile, the last public post on it was 2016.Hmm, maybe he escaped from the shackles of the internet, ha.
#510
The Rumpus Room / Re: What's on TV?
Mon 14/05/2018 19:18:57
Oops wrong actor name, I got my Robert's mixed up!

Ah ok Cassiebsg, seems we're both having an off day! I loved it when he popped up in First Contact.
#511
The Rumpus Room / Re: What's on TV?
Mon 14/05/2018 17:51:50
Quote from: Cassiebsg on Mon 14/05/2018 12:24:36
well, that actor has been in several STs... though not Voyager...

I thought the clue was this program has an actor who has been in star trek but not voyager, which is what Robert Beltran mostly was in.. I'm confused?
#512
The Rumpus Room / Re: The 4 word story thread
Mon 14/05/2018 10:07:27
the AGS community. Which
#513
The Rumpus Room / Re: Name the Game
Sun 13/05/2018 17:53:58
Egypt 1156 BC?
#514
Fair point! Oh ive changed my global variables just now, its early days and was a five minute job to find all usages and then remove the g's.

looking at my variables, several of them require more than just false or true, so it's not really an option for me.

For instance, I have a sleeping character. On 0, the main character has no reason to wake him. when he finds out he needs to speak to him, it changes to 1, and he struggles to wake him. you use an inventory item to wake him up, it now becomes 3, and a dialog is now started upon interacting with him.

you probably could have it check multiple bools to achieve this, but that sounds even more complicated to me! :P
#515
The Rumpus Room / Re: Name the Game
Sun 13/05/2018 14:50:50
Rip Off Zaxxon
#516
Looks like I learned something too Volklaw!

Cassiebsg: Thanks. I might rename some of my variables just incase. They seem to be functioning okay but if it might cause me problems later on.. (and of course rename where said variable is used)

Why use a bool over an int, sorry? Sometimes I have initially intended for a variable to be just 0 or 1, but then found I need it to change to 2 as part of a puzzle. So I understand bool is 0 or 1, as in 0 is false 1 is true, or vice versa, right?

But let's say for arguments sake he later decides he wants his character to stop halfway on the ladder, and change the interaction with the book from "i can't reach it" to "i still can't reach it". He can't use his bool anymore, he'll have to change it to an int.

So honest question, what is the advantage of using a bool? Edit again: ah going on ags engine i see a bool actually says true or false. Is that the only difference? If so I'll stick to ints in most cases, but it's useful to know! :)
#517
The Rumpus Room / Re: Name the Game
Sun 13/05/2018 10:25:56
Hey! Ahh I thought id briefly played this on a retro collection but wasn't sure if it was this, or what collection it was.
#518
Hey, welcome to the forums!

I hope I don't sound rude, but most, if not all of this, is covered in the AGS tutorial, "Getting Started". If you click on Help at the top of the ags window and click on contents, you'll find a folder called Tutorial with "getting started" inside. I'm pretty sure all your queries are covered in this section. If you follow that and are still not sure, then let us know what troubles you!

Its just the character getting up the ladder that might prove trickier for you, see how you get on with the other bits first.

Edit: Oh, as for not being able to reach the book, a global variable can be created by going to the global variable window in explore. right click in the space, and name your variable, for example gBookread. Set the number to 0, leave the other settings as is.

Now when you go to room and whether its a hotspot or an object, go to its properties window and the tab that's a lightning symbol iirc, click ... on interact, and the script will generate an empty function for you. now you want this script inside the {}

if (gBookread==0)cEgo.Think("I can't reach it.");
if (gBookread==1)cEgo.Think("I read the book.");

those should be on two lines, my phone puts rest of thinking line on next line when it shouldn't be.

Now to change that variable, when the action of the character is going up ladder (maybe someone else can explain how to do that), set the variable to change, so for instance when the interact with ladder has been given a function, much like the book, use this line

gBookread=1;

When he goes down ladder, that variable will need to be changed back to 0, incase player doesn't take book and goes back down.

Notice its two = for checking a variable, and one = for changing it.
#519
The Rumpus Room / Re: Name the Game
Sat 12/05/2018 22:10:05
Makes sense, it says "in Spanish" which mean they felt the need to put that because it's not normally in that language.

Anyway, whose go is it??
#520
The Rumpus Room / Re: What's on TV?
Sat 12/05/2018 16:41:36
Um.. Due South?

(Because that was Canadian, athough this looks nothing like it, so..)
SMF spam blocked by CleanTalk