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

#481
The Rumpus Room / Re: Name the Game
Tue 22/05/2018 08:05:52
Crafty insertion of self promotion!

Mandle's post is sponsored by BISHI AND THE ALIEN SLIME INVASION! For when you want to play something non adventure like!
#482
Awesome cover!

I've been looking at the clips, and I'm in shock at the butterflies, the parralax like scrolling, the animation, everything is sooo polished!
#483
Quote from: Cassiebsg on Mon 21/05/2018 14:48:46
Okay then, I'll shut up now and let the experts talk. :-D

Right then! What you need to do is ManicMatt is pulled into a passing van that drives into the nearest ocean, the driver jumping out at the last second, using their experience from playing GTA games.
#484
You're only human, I just wanted you to know you're appreciated. Its all good.
#485
Crimson, you know when I try and help people in the technical help threads even though I probably shouldn't.. well its because you're always on there helping people out and I want to lighten the load for you!

You're a legend, and you have more patience than I! So I hope you don't feel discouraged, we all know you work your ass off, for very little or nothing in return. So, thank you.
#486
Crimson - Well, it was just an example as they asked me, it would be the same principle with a door object using a bool. But yes I could do the sprite number too, I did that with a rotating puzzle thinking about it,

Oh okay I thought they'd be typing all that out for each object!


Okay, I think this graphic thing is beyond me for the time being. I seem to be doing okay with my scripted events recently.

#487
The Rumpus Room / Re: Name the Game
Mon 21/05/2018 12:02:48
Ben X, this would have worked better if you'd Pm'd Mouth for war the image first :P
#488
Woah, that state property looks complicated and unnecessary to me, but Crimson would know better than me if that is the case. But I cannot help but get the feeling you're making more work for you than you need to, as impressive as that coding is!

Your first script you shared, there's ... at the start and end, does that mean there is more code that we haven't seen within that function that is related to the code?

As for your question, I just use global variables, with an int or bool depending on what it is, like, telling the game if my character is at the top of some stairs or the bottom when the player uses them.

Code: ags

function hStairs_Interact()
{
if (IsEgoAtTopOfExteriorStairs==true){
  cEgo.Walk(325, 222, eBlock, eAnywhere);
  cEgo.ChangeView(27);
  cEgo.Animate(0, 4, eRepeat, eNoBlock);
  cEgo.Walk(321, 319, eBlock, eAnywhere);
  cEgo.ChangeView(1);
  IsEgoAtTopOfExteriorStairs=false;
  }
else if (IsEgoAtTopOfExteriorStairs==false){ 
  cEgo.Walk(323, 323, eBlock, eWalkableAreas);
  cEgo.ChangeView(26);
  cEgo.Animate(0, 4, eRepeat, eNoBlock);
   cEgo.Walk(299, 225, eBlock, eAnywhere);
   cEgo.ChangeView(1);
  IsEgoAtTopOfExteriorStairs=true;
  }
}


Crimson will probably tell me that's a weird method or something lol, but it appears to work! I don't know how this would work with this graphics thing I've first heard about on this thread lol. Where does AGS even know where these sprites are, I'm confused and the manual seems to mention it only briefly with one example of code that doesn't look like yours!
#489
The Rumpus Room / Re: Name the Game
Mon 21/05/2018 10:32:37
Yeah I only played it the once but I recognise it from Blade Runner too!

So... not much point in Mouth for War doing the second half??
#490
That's weird, I didn't even know about this graphic command and I've made 2 AGS games!

Like eri0o says though, assign a view and put your animations in the loops.

So you'll use this code, changing the numbers to what your view and loops etc should be:

Code: ags

oCupboard.SetView(10);
oCupboard.Animate(0, 2, eOnce, eBlock) ;


You might only need to set the view, but im not sure if it will use loop 0 by default, I can't remember.

Also, you'll quickly realise that without any if statements, like a variable, if the player interacts with the bucket again, those actions will repeat themselves. Not sure if you're aware of that.
#491
Brilliant, thank you! I was advised to manually change the length of a sentence (Not the actual sentence itself, but the time it's onscreen), and then change it back to standard length, everytime someone said a short sentence, like "Hello!", so I assumed this was the only solution.
#492
My predictions will probably be a laugh for you - I'm pretty clueless and don't really care, but for the community's sake, I put my numbers in.
#493
The Rumpus Room / Re: The 4 word story thread
Sat 19/05/2018 16:14:37
said the Timekeeper, master
#494
The Rumpus Room / Re: The 4 word story thread
Fri 18/05/2018 18:06:31
Gravity was gone, because
#495
Oh yeah, it was past my bed time heh. That z order works just fine, although I'll see if I prefer the transparency, but at least I can fall back on z order.

However I realised I do need the text width thing, as longer descriptions don't display the whole text. AGS didn't recognise lblOverhotspot, so I assumed that was what my GUI label name is, so I changed that, but when I run the game, the hotspot descriptions completely disappear. Could this be related to what Crimson said about the verb coin? I might have to restrict my descriptions to not be very long, what a bother.

This is how I modified Khris' script for my label name:

Code: ags

 // before calculating the position, set label and GUI width based on text
  String ln = Game.GetLocationName(mouse.x, mouse.y);
  overhotspot.Text = ln;
  overhotspot.Width = GetTextWidth(ln, overhotspot.Font) + 2; // small error margin to ensure text doesn't wrap
  gOverhotspot.Width = overhotspot.Width; // assuming label's x coordinate on GUI is 0
  // gui position calculations here
#496
ooh thanks, this will come in handy! I shall see if making the verb coin semi transparent at the bottom works! (and maybe that tweening thing can make it smoothly transition.. oh boy what am I getting myself in for!)
#497
Trust me to choose a module not used very much!

My next challenge - at the bottom of the screen, the text label is now hiding underneath the verb coin, arrghhh!! When I had that previous code as seen at the top of this thread, the label simply jumped above the verb coin, but I'm not sure if putting that in will conflict with the new code (just the if conditions relevant). But it's nearly bedtime where I am, I should switch my brain off for tonight, ha!

(I am however very appreciative to you two, this new code not only works with the inventory cursor, but looks a lot nicer than the label flicking to the sides etc, although if I can make it do that at the bottom, its acceptable.)
#498
Woohoo, it's centred now, thanks guys for all your help! It's ironic that this morning I realised I hadn't asked for any help for a while which is good, and then.. doh!

That width / 2 did the job. Just so it's not alien code to me and to say I've learned something.. is that / = divided, and 2 = by two?

Crimson: Interesting, because with this new code layout, the verb coin AND the inventory cursor are working the same as with hovering over hotspots, when they didn't before. Is it possible I tinkered with something and I've forgotten I did that??
#499
I've been at this since my last reply, close to throwing my laptop out the window lol.. sob..

Okay I've been confused at the manual's brief example of GetTextWidth that shows "Hello" and displays hello, but doesnt explain what im supposed to put instead of some speech marks. I've looked at Crimson's code in the other thread again about text width, and I don't understand it either. I can't get my head around it. But yeah I might not actually need it anyway..

So let's go back to basics.

As of right now, my label appears below and to the right of the cursor. If I change this with SetPosition, when you move the cursor to the far right, the text doesn't stop at the edge anymore, it stops further left. So this cannot be the solution. I also cannot actually test the far left because it doesn't reach the edge because the text is to the right anyway. So how do I centre it? What am I missing?

Thanks again!
#500
Because I couldn't work out how to make your script you gave me work with the verb coin, I didn't look into the text width thing. Oh so AGS needs to dynamically check the size of the text to appear to know how to display it properly? I'll have a look in the manual now haha. Thanks.
SMF spam blocked by CleanTalk