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

#1
Hi, I want to have some text that alternates between different labels, so to do this easily, I need to use the ID number of the label. However, I'm having trouble setting the text by using the ID number.

I know normally, I would use; MyFirstLabel.Text="Here is some text!";

But using the ID number, I've tried;

Label.0.Text="Here is some text!";
Label[0].Text="Here is some text!";
Label(0).Text="Here is some text!";

Is there a way to make this work? Thanks!
#2
I'm trying to use DrawStringWrapped to display a message, but I'm having problems. I'm currently using;

surface.DrawStringWrapped(50, 50, 700, 1, eAlignCentre, "%s talks to %s.", Name1, Name2);

but that returns the error 'Error (line 184): wrong number of parameters in call to 'DrawingSurface::DrawStringWrapped'

The code DOES however work for Display, when I used; Display("%s talks to %s.", Name1, Name2);}

The manual says "You can insert the value of variables into the message. For more information, see the string formatting section." so I would have thought they would have worked the same way.

What am I doing wrong? Thanks!
#3
I think you're missing 'If', so it would be;

if player.ActiveInventory = iNOTEBOOK; {
player.Say("Why would I want to stick it in there?"); }
#4
I was wondering if someone could give me some advice. I want to a have some minigames in my adventure game that work just like a text adventure, with large amounts of text on screen. I can figure out the parser scripting, but because of the character limits for labels, the Say command and the Display command, I'm not sure how to get large blocks of text on screen (additionally, I would prefer not breaking up the text because I want it to stay displayed on screen).

Are there any methods I am missing? And additionally is there a way to format the layout of the text?

Thanks!
#5
Critics' Lounge / Re: Disney Website Design
Mon 15/09/2008 22:15:33
Not harsh at all, only very very useful :).

I agree with pretty much everything you've said. I'll go through each point and try and correct them then post my results afterwards. You're right about the header being unbalanced. I've tried adding the search bar up there (I wasn't very happy with having it along the navigation bar) but it doesn't seem to look right at the moment. I'll do some tweaking and see what I come up with.
#6
Critics' Lounge / Re: Disney Website Design
Mon 15/09/2008 18:40:46
Erg, I had a feeling it would cost that much, a bit out of my price range. Ah well, I'll make the site in html for now and maybe come back to it a few months down the line. Thanks for the guidence, TerrenRich.

I've switched the gold to a more orangey colour after looking at a complementary colour chart and it looks better. I just think it needs a general neatening up, but I don't know how to improve further than aligning some of the different elements. Can anyone give me any more advice on improvements?

#7
Critics' Lounge / Re: Disney Website Design
Mon 15/09/2008 00:35:57
Thanks for the reply :).

It's going to be a database website. I only know html, but I realise this is far from ideal for the type of website I want so I'm looking into php. I have to say it's all over the top of my head at the moment :-\. I guess it's good to get a design I like whilst I'm figuring out this coding stuff. I'm also considering paying someone to put together the basic code for it, but I haven't really looked into that yet.

I've looked up the complimentary colours and it looks quite good with the orange instead of the gold, in fact it makes the gold look rather bleurgh when I change it back lol.

I'll keep tinkering away! No euphemisms there.
#8
Critics' Lounge / Disney Website Design
Sun 14/09/2008 21:09:38
Hi there, hopefully this'll be allowed even though it's not directly AGS related. I did a search of past Critics Lounge posts and it seems website layout are allowed to be posted here so maybe if I say please this'll be allowed :).

Anyhows, I'm wanting to make a website about the Disney Imagineers (they're the guys that design and engineer the Disney parks and rides) but I'm having trouble designing the site. After a lot of trial and error, the best I've got is this;



I've gone with a blueprint inspired design (as can be seen by the Disney castle blueprints at the top) but I still think it's coming out quite amateurish. I'd really appreciate it if anyone could give me any advice or help on how to improve it! Thanks everyone :).
#9
Downloaded it and checked it, and it seems to be working fine now :). Thanks for fixing it!
#10
Ah thanks for that, just what I needed. I guess I should have done some more experimenting with the code I found.

Now I just need to deal with all my characters realising it was Earth all along...
#11
I was wondering if there's any way to return a character ID number with Character.GetAtScreenXY rather than getting the character name? The only was I can think of doing it is something along the lines of 'if (Character.GetAtScreenXY==cEgo) { CharacterID=1; }' but that doesn't seem a very efficient way (at all) of doing it.

Searching the boards I found this piece of code:

int myobjectnum;
Object *myobject = Object.GetAtScreenXY(x, y);
if (myobject != null) myobjectnum = myobject.ID;

which I think might be useful to what I need to do (?), but I'm not sure how to use it in my script.

Thanks for any help!
#12
Yay it's not my scripting :)
Yeah, it turns out the it isn't fixed as I thought it was, but seen as it's a bug I'll leave it for now and come back to it later. Thanks to everyone for helping out.
#13
Ah thankyou! It seems to be working now - at least, it's not crashing. It's reading "DBG: 49 100".
What was I doing wrong here? temp.Chars[1] should give the first character of the string if I understand this correctly... how comes its coming up as 49?
#14
Quote from: matti on Mon 09/06/2008 13:55:46
To demonstrate the problem you can just upload the compiled-folder. No scripting in there..

Oh heh silly me. Yeah will do.

Quote from: SSH on Mon 09/06/2008 14:05:41
Have you ever cut-and-pasted anything into a script from Microsoft Word?

It changes quotes and hyphens to odd characters that AGS doesn't display.

Nope, I'm pretty sure I haven't. At least looking through the scripts in AGS doesn't show any of the symbols that are appearing.

EDIT

Okay, I've uploaded a demonstration of the problem here: http://disneysneverland.angelfire.com/AGS_Tycoon.rar

To replicate it, just click the construction tab at the top (anyone who's played RCT will recognise my placeholder graphics lol), select the hut, and then basically just keep building huts on the map.
Sometimes it crashes straight away, other times it crashes on the fiftieth attempt at building the hut. It seems random to me so I'm sorry if I can't give any better instructions :-\... basically just keep building them and it'll crash eventually within a couple of minutes.
#15
Of course  :)

I don't want to release all of my code publicly and I'm not too sure how to isolate the problem script from the rest of my game, but I'll upload the files and send you a PM with its URL so you can have a look at it. I'm happy it might not be my amateurish scripting that's the problem lol.
#16
Okay, I changed it to remove the - sign, but the symbols still appear.

I also fixed Clicker1 so that it was always at 100 and didn't change, but the symbols still appeared.

The part I can't understand is that sometimes the symbols appear, at other times they don't, even when the code isn't changing - ie. Clicker1 is staying at 100.
#17
Clicker1 is changing, but the weird symbols seem to appear/not appear at random regardless of its value (I've tried it with many different values but the weird symbols seem to appear around 10% of the time no matter wha the number is).
BlockRefund[Clicker1] is always -100.
#18
BlockRefund[Clicker1] is -100.
And I have no idea why it's ending up as þ lol.

I'm not sure what you mean by what it contains?
It's meant to end up with the character saying $-100, and it is doing that most of the time. But every so often it's showing þ instead, even though the information isn't changing.

EDIT

Ok, I've let it run a whole bunch of times, and it turns out its not just the þ appearing. A "J", "G", ">", and one of those square symbols you get on webpages when your browser doesn't have the font has appeared too lol. I'm completely lost why this is happening lol.
#19
Thanks again for the replies.

I switched it to a TTF font, and now its appearing as the symbol þ.
Oh, and a correction, the value is -100, not 100.
Is $-100 code for that symbol in AGS?

The strange thing is, it doesn't happen all the time, only sometimes, even though the code isn't changing.
#20
Lol, I realised just after I posted and edited my post.

BlockRefund is an array: int BlockRefund[500];
SMF spam blocked by CleanTalk