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

#1
Quote from: monkey_05_06 on Wed 17/07/2013 21:41:07
Quote from: Magic on Tue 16/07/2013 14:52:364. New: If Player has inventory during Dialog

If the player has an item in their inventory, I want to enable a new dialog option.

Code: ags
@5
EGO: Do you believe your workmanship was of a high standard?
C1Hargreaves: Of course, Your Honour. I did what I said I'd do - I put in those kitchen units.
 if (EGO.HasInventory(C1_Photo1)) {
    EGO.Say("You recall that you have photos of the kitchen following Hargreave's work and consider asking him about them.");
 option-on 6
 return RUN_DIALOG_RETURN;
  }
return


I've tinkered with this and followed it from the AGS help file but get:
Dialog 4(27): Error (line 27): Parse error in expr near '0.'

Any ideas?

I think myself and Khris got a bit caught up in our snarkiness and didn't catch the real issue here.
Ah, of course. Got it. It's the same mistake as the lack of indentation earlier for certain commands in the dialog script. It works now, thanks a lot! :)

That concludes my main queries - I should be able to finish off the prototype. The only other part I can think of is a in some dialog where each of the 4 answers from the player leads to the same result so rather than copy and paste the same dialog into each I'll try to re-direct them. I'll try to work that out myself though. Probably a variable or such.
Quote from: Khris on Thu 18/07/2013 09:35:16
Dang, I was looking through the script for a constant with value 0, but completely missed the "EGO" part of EGO.HasInventory().

Magic:
Quote from: Magic on Wed 17/07/2013 21:10:34I'm gradually working my way the manual, but I did base it off what you told me in this thread, I assumed that would be enough.
But, you got a specific parse error when you changed the Display() content, right? So it obviously wasn't enough. You don't get to ask stuff like that while everybody else is referred to the manual, not even if you had coded AGS's game of the year in 2008. There is no excuse for not checking the manual first.
. . .
#2
Quote from: Khris on Tue 16/07/2013 17:51:56
First of all: you need to work with the manual more.

If you're getting a parse error when using a command, look it up. In the manual entry for Display is a link to the string formatting section, which contains this at the very beginning:
QuoteThis means that you intersperse your text with special codes to insert a variable's value. These special codes begin with a percent sign, and then specify the variable type. The actual variables that you want to display are then listed afterwards.
Thus:
Code: ags
  Display("The date is %02d:%02d for the case of McCarthy vs. Hargreaves.", dt.Hour, dt.Minute);

(Nevermind for now that you're still using the hour and minute, not month and day.)
I'm gradually working my way the manual, but I did base it off what you told me in this thread, I assumed that would be enough.

QuoteRegarding your problem with the inventory item inside the dialog script:
As soon as you have typed the first three letters of any object or function or whatever, a window will pop up and suggest existing stuff from your game, like for instance inventory items.
I don't get how people do not use this, sorry. It's pretty much impossible to get the spelling of something wrong that way. The relevant entry is the script name, the one you entered in the inventory item's properties under Design/Name. The Appearance/Description one is the one the player is going to see. As an example: Name would be "iBlueCup" and Description would be "blue cup".
Yes, I've kept the inventory item name simple - in this instance I have 'C1Photo1' but I'm still getting the error. The spelling is not the issue here.

Quote from: monkey_05_06 on Wed 17/07/2013 04:20:48
Quote from: Khris on Tue 16/07/2013 17:51:56Also please ignore Sunny Penguin's reply since using dialog_request has been obsolete for years now.

Only since 2008, I mean...that was practically yesterday.
That actually was when I last used AGS. I actually have a stored version of it from back then in case I want to update my uni project... :D

Quote from: Pumaman on Wed 24/12/2008 14:02:32
As to the issue of calling "Dialog.SetOptionState", you could also use the dialog script command "option-on" but you have to remember that dialog script commands are not indented in dialog scripts, normal scripting commands are. This is a special case where indentation should be used for something other than separating blocks of code, but if you have conditionals or loops in a dialog script then normal indentation rules should still be applied.

And yes, Khris, I agree that a firm introduction to Artie Effim (best known by his initials, RTFM) is in order. Or maybe even, dare I say it... RTFHTRTFMM. := (Just don't take it too personally Magic, it's the same process I tell everyone to follow :P)
I'm still getting back to speed on AGS so please excuse me. And hey, my original project was an IT Technician sim, complete with a poster with "RTFM" on it in the game's IT department.

I've read through the last few posts several times but I'm still at a loss here. The inventory item is correctly referenced. The return dialog is using aforementioned return macro. What do I need to do?

Code: ags
@5
EGO: Do you believe your workmanship was of a high standard?
C1Hargreaves: Of course, Your Honour. I did what I said I'd do - I put in those kitchen units.
 if (EGO.HasInventory(C1Photo1)) {
    EGO.Say("You recall that you have photos of the kitchen following Hargreave's work and consider asking him about them.");
 dialog[4].SetOptionState(6, eOptionOn);
 return RUN_DIALOG_RETURN;
  }
return
#3
'Ey yo, add me to your Steam lists. ben.brown@talk21.com \ Magic. I've joined the AGS group too if that makes it any easier.

Quote from: Ghost on Tue 16/07/2013 10:04:46
Quote from: Magic on Mon 15/07/2013 22:31:42
I'm hoping Bioshock Infinite drops below 40% at some point. I can then add it to the Windows 7 games I've bought but am unable to play until I upgrade my PC and OS... :D

Bio Inf is put up for voting; it'll be 50% off then- looks like your wish could become true!
:D
Sad thing is that I want it even cheaper than 50% off. I know it will be at some point (Maybe not in this sale, but you never know). I know it's one of the best games this year, but I also have other games to play for now so I can wait. Not even counting my current games, once I get a new machine with Win7 I'll finally be able to play Battlefield 3, X-COM, Sleeping Dogs and Dishonored available ...
#4
Doh, makes perfect sense. I've modified it but I'm still getting that parse message:

Code: ags
@5
EGO: Do you believe your workmanship was of a high standard?
C1Hargreaves: Of course, Your Honour. I did what I said I'd do - I put in those kitchen units.
 if (EGO.HasInventory(C1Photo1)) {
    EGO.Say("You recall that you have photos of the kitchen following Hargreave's work and consider asking him about them.");
 dialog[4].SetOptionState(6, eOptionOn);
 return RUN_DIALOG_RETURN;
  }
return


I've modified the inventory item to C1Photo1 as a test but it's the same. The item is a standard one as far as I'm aware, with an inventory image, the 'Description' and 'Name' are both the aforementioned 'C1Photo1'.
#5
Thanks for your help too, Kris.

1. Dialog Lists: Great, thank you.

2. Character.Say: That seems to work but the character doesn't appear.

At present I have single static images of a character portrait (Think Sierra) to show when each speaks. There's one frame for the view which is assigned to each character. Is there a way to show their portrait or will I need to move the character to the room each time they talk there? In the case of a bailiff character, I may have him commenting to the player at different times (In the court room, judge's chambers, etc).

If I have to move him between rooms, that's not a problem.

3. Date and Time:

I can't get that to work:
Code: ags

DateTime *dt = DateTime.Now;
Display("The date is %02d:%02d", dt.Hour, dt.Minute" for the case of McCarthy vs. Hargreaves.");


I've played around with the quotation marks but get error:
Failed to save room room5.crm; details below
room5.asc(15): Error (line 15): Parse error in expr near 'dt'


4. New: If Player has inventory during Dialog

If the player has an item in their inventory, I want to enable a new dialog option.

Code: ags

@5
EGO: Do you believe your workmanship was of a high standard?
C1Hargreaves: Of course, Your Honour. I did what I said I'd do - I put in those kitchen units.
 if (EGO.HasInventory(C1_Photo1)) {
    EGO.Say("You recall that you have photos of the kitchen following Hargreave's work and consider asking him about them.");
 option-on 6
 return RUN_DIALOG_RETURN;
  }
return


I've tinkered with this and followed it from the AGS help file but get:
Dialog 4(27): Error (line 27): Parse error in expr near '0.'

Any ideas?
#6

:cheesy:

Includes:
Dishonored
Machinarium
Fez
Beyond Good and Evil
Chivalry
Darksiders
Deadlight
Napoleon: Total War (Still got Empire to finish off, then Shogun 2...)
Organ Trail
Sleeping Dogs

I'm hoping Bioshock Infinite drops below 40% at some point. I can then add it to the Windows 7 games I've bought but am unable to play until I upgrade my PC and OS... :D
#7
General Discussion / Re: Free Steam keys!
Mon 15/07/2013 22:23:41
Give it until tomorrow and if no one else wants it, sure.
#8
Thanks again monkey. I'd say I feel guilty for taking up this much of your time, but I can tell you're voluntarily doing so. ;)

I'm not naturally a tidy person, my hand writing is terrible (But I do have solid form when typing) and I don't keep my home especially tidy. I'm also someone who makes daft little mistakes in code so I can appreciate that keeping comments in my code will be worthwhile.

Inventory\GUI: I'll give that a try sometime. At the moment getting a prototype up and running is my priority. I could keep them as room objects or I could just make them inventory objects or I could customise the GUI. We'll see.

The first trial is about 75% done, I've somehow spent half of today on it (11AM to 5PM, wow) but a lot of that was experimenting and finding solutions to some parts.

I've got some more quick queries:

1. Is there an easy way to do line breaks in, say, a narrator's text box? I can't find a straight forward method on the forum so far.

In this instance I have a profile for the judge to read and I would like it displayed like this rather than separate boxes:

"Name: Person
Age: 22"

2. Is there a way to have a character speak one line of dialog within a room script? Not crucial, I can use the narrator (Old Sierra games did this - ' "Hey!" says the drunk "Leave me alone!" ').

3. Is there an easy way to call the user's own date into a conversation? Not crucial, I just think it would be neat to use the current date for a trial.

I may have something to show you guys tomorrow. :)
#9
General Discussion / Re: Free Steam keys!
Mon 15/07/2013 16:36:52
Actually, let Eric have The Ship (If it gets sent then I'll ignore the code). I've got a metric ton of games to play through at the moment.

I swear, most of my Steam games get played once and then never again... :D
#10
General Discussion / Re: Free Steam keys!
Mon 15/07/2013 14:15:30
Anian - I'll take Costume Quest if no one else wants it. I was curious about the game, but never felt like the demo had much to offer beyond the combat (Timed attacks ... and that's it?).

AGA - The Ship looks interesting so I'll give it a whirl if no one else wants it. :)
#11
1. To clear up my last query: so as you've seen I'm moving the player to the court room, having a character talk to them and setting things up in the dialog script (because the dialog will appear last otherwise) so the player can then do stuff in the room such as reading over the case file and use the court computer.

Is that the best way to do it or should I set an integer to flag that the dialog is finished so I can return the code to the Room Script?

2. Can I safely edit the default GUI so to include icons which lead to two rooms? i.e. The Case File is a description of the current case while the Computer is used to select witness testimony. Rather than constantly put the sprites on the screen, I could take the player to another room and they can select information related to the current case.

I don't need full details on how to do this, just any of your thoughts. I need to work some things out on my own. ;)
#12
No, he's right, I didn't do indentation. I don't come from a programming background, but that doesn't excuse the habit. I'll try to keep it neat and tidy. Thanks guys. I'll be doing some more work on my prototype today, I'll post any other queries.
#13
According to Extra Credits, the Walking Dead games have done something truly amazing for the genre. Good episode, though I agree that the 'dead genre' label isn't really valid.
#14
Nevermind, got it. I TRIED putting the script commands into the dialog, but didn't realise I had to do the single space indentation to set them up.

I'm sure I'll have more queries tomorrow, stay put...
#15
Hi there,

I'm getting back into AGS after having last used it over 5 years ago (Yikes!) for a university project. Now I'm hoping to construct an actual game where the player is a judge in a court of law. See this thread for more information.

I'll stick to using this thread for any technical queries I have - any help is appreciated.

1. Dialog after entering a room. The first trial begins in the court room, here's the room script:

--
if (case1_start == true)
Ace_Attorney_Court_Suite.Play();
{Display("Welcome to the courtroom.");
SenJudge.ChangeRoom(2, 250, 650);
{Display("A Senior Judge approaches you.");
d1SenJudge.Start();
SenJudge.ChangeRoom(0, 250, 650);
{Display("You switch on the court's computer system.");}
Computer.ChangeRoom(2, 250, 650);
}
}
}
--
I'm moving the player to the main court room, playing some music (It's placeholder) and want to have a senior judge character appear (It's just a static image), he speaks his dialog script and then leaves. A computer 'character' will then appear for the player to interact with so they can do their research and the trial can begin.

However, at the moment the dialog is happening _after_ the other parts (The judge moves to another room, the display message about the computer appears). The dialog file is just a series of text displays followed by a 'stop'.

I've had a look through the help file and tried different functions but nothing works so far. I've now realised that with the dialog:

"NOTE: The conversation will not start immediately; instead, it will be run when the current script function finishes executing."

How can I get around that?
#16
How about I just create a Citizen Kane adventure game?

LOOK at ROSEBUD

SMASH the ROOM
#17
It looks fantastic, really. I'm not an artist so I'm not sure what to say, but two considerations:

- The shadow on the two small bushes in the middle (forground) doesn't look right, not sure if the shadow is too big or that light would be passing around the leaves and branches.

- I can see you're being subtle with the Aztec temple and not shove it in the player's face, but it looks a little _too_ obscure. Is there a way to make it more significant?
#18
Hi guys,

Thanks for the feedback. I'm at least going to develop a prototype and use this to get back into AGS. Cheers!
#19
Overview:

You are a judge of the court.

It is your responsibility to oversee trials where you will select witnesses, arrange testimonies and ultimately decide the verdict of the parties before you.

Can you establish the facts? Can you see through falsehood and reach the truth? Can you issue a fair verdict? Will justice be done?

The defendant's fate is in your hands.


I'm considering making a prototype in AGS for a game where the player is - you guessed it- a judge. You will deal with criminal cases and decide on the verdict. Naturally it's inspired by the Phoenix Wright (Ace Attorney) games but also by the "You be the Judge" books I read as a child (You'd get a short story and pictures to examine, there would be a single clue to decide whether the claimant was guilty or not). I've also found that there are also some 'Judge simulations' on the net though they're not quite adventure games.

I've put up the brief concept, some links and (most importantly) the script for what would be the first case in the game:

http://ge.tt/6BUKJ2l/v/0?c
(If anyone is concerned about that site then just ask and I can email it, as it's only a 10KB zip file)

I'm aware of the obvious flaws with the concept - that it will be text-heavy and without much for the player to do compared to other games, just like Phoenix Wright, but I think getting to make sense of a criminal case and reach a verdict will be interesting. There is scope in allowing the player to make other decisions like which witnesses to hear from, what questions to ask (you'd have a limited number to ask depending on the difficulty of the case) and so on.

I've been wanting to construct a full game to show off my skills (The closest I've made in the past was an IT technician simulation for university, made in AGS) and I think this is a feasible project since I could make as many cases as I feel like. For further inspiration I'm even considering going to a public gallery to watch a trial and there are plenty of case studies available online.

I also know that it has to be more of a game than a simulation so it will take plenty of liberties with the court system (Again, like Phoenix Wright) and would be about the player's sense of justice and conscience rather than legal wranglings.

What do you think? Is it worth making? Any feedback would be welcome.
#20
A 'Citizen Kane' would have to be very critically popular and serve as an example not to others of its ilk but the entire medium. It certainly hasn't happened and so it's hard to say if it ever will given the state of the genre (Bless it). Gaming is still 1/4th the age of movies (Or 1/3rd at least) and has a long way to go.

Also, genres seem to blend much more easily in gaming compared to movies; the web video series Extra Credits make a good example between Call of Duty (An FPS shooter, but its multiplayer has RPG elements) and Mass Effect (An RPG, but it has shooting-based gameplay), so I think that makes it harder to say that 'adventure games' have reached a certain level.

I'd say when gaming has reached is played by an even larger share of the public (moreso than now and more than the Farmville crowd) then we can consider it.

'What is the "Citizen Kane" of gaming?' - now that is also an interesting question...
SMF spam blocked by CleanTalk