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

Topics - FinalSin

#1
I've had a search for this, and... it's sort of already solved. Sort of. People are raising the question, and someone offers a solution, but it's normally skewed towards some fancy method of speech, which I don't really have.

The problem is quite simple - I have a text-box overlay on the screen, which is just a graphic, onto which I plop my speech. I need the speech to start at the top left corner, left aligned, and work down.

I've got the left aligned part down pat, but once the speech spills into a second line, is pushes the text up, instead of down. This is a common problem, but I can't find a common solution. Any help?
#2
Right. The problems are getting simpler and simpler, it's so silly!

When you initiate dialog with a character, AGS runs this script:
Code: ags
character[EGO].Walk(60, 130, eBlock);
if(Fez == 0)
		RunDialog(0);
else
		{
		if(Fez == 1)
			{
			RunDialog(5);
			}
		else
			RunDialog(7);
		}
}


I can't get it to recognise the Fez variable equalling anything except 0. I change the Fez variable to 1 more than once, and I'm sure those triggers are working. But it's not registering with this script. The Fez variable gets changed to 1 twice in another room. Fez is initialised at the top of the global script, and exported. It is imported in the Main Script Header.

I have no idea where the bug is.
#3
Code: ags
#sectionstart dialog_request  // DO NOT EDIT OR REMOVE THIS LINE
function dialog_request(int parameter) {
  if (parameter == 1)
		{
    SetGraphicalVariable("Intro",  1);
		}
	else
		{
		  if (parameter == 2)
		  {
		  SetGraphicalVariable("Booze",  0);
		 }
			else
			{
					if (parameter == 3)
					SetDialogOption(2, 9, eOptionOn);
					else
					{
					  //The Big Script
					  character[EGO].Walk(140, 78);
					  character[WAIT].Say("Hey, Officer!");
					  character[OFF1].FaceCharacter(6, eBlock);
					  character[OFF1].Say(Yes,  ma'am?);
					  character[WAIT].Say(I got some important evidence for ya.);
					  character[OFF1].Say(Re-really?);
					  character[OFF1].Walk(239, 84, eNoBlock);
					  SetDialogOption(2, 9, eOptionOffForever);
					  Overlay* character[OFF1].SayBackground(So,  where's the evidence?);
					  character[EGO].Walk(69, 173);
					  Overlay* character[WAIT].SayBackground(Let me whisper it.);
					  character[BMAN].Say(Thanks,  officer.);
					  Overlay* character[OFF1].SayBackground(It's WHERE?);
						character[EGO].Say(Don't mention it.);
						RunDialog(7);
					}
			}
}
#sectionend dialog_request  // DO NOT EDIT OR REMOVE THIS LINE


You can (hopefully) ignore the top few and start reading from parameter == 3. I'm being told that the FaceCharacter line attempts to convert an int to a character, and it's causing a type mismatch. I'm using a lot of techniques for the first time, so I've been unable to diagnose it myself.

Need any more info?
#4
I hate posting here. Moreso now that I've learnt a bit of java, because firstly, I think "You really should be able to work this one out." and secondly, I'm sure there is a hidden section of the manual or this website where all of these things are. I searched - I promise!

It's simple, so I know there's a solution.

I've got a character. When you talk to this character, I want it to run a script to check the status of a particular variable. So I've got this:

Code: ags
  // script for Character 4 (Barkeep): Talk to character
character[EGO].Walk(60, 130, eBlock);
if(Fez == 0)
		{
		RunDialog(1);
		}
else
		{
		RunDialog(5);
		}
}
#sectionend character4_a  // DO NOT EDIT OR REMOVE THIS LINE


It tells me that Fez is not defined. I know what this means from java - it means I haven't initialised the variable. But I don't know where to. I've put it right up at the start (at Run When Game Starts), but that isn't going it. I know this is obvious, and I'm sorry, but it's now a wall in my way...
#5
This might be a full-blown technical question, but I'll always consider myself a newbie, I'm afraid.

I'm working with what should be a very basic thing - it's just a string of commands. First Time Player Enters Room - do this, then this, then this. No conditionals, and it's done without using the script (except in one place - the first action is to run a script that relocates an NPC to the current room at specific co-ords).

What happens is that the speech runs as normal, but the characters don't move like they should. Then when the sequence of events finishes, it runs again except this time they move properly.

It's odd, and I've not seen it before. I'm running 2.71, downloading the Final 2 of 2.72 now.
#6
I've just downloaded the newer version of AGS today, and I'm not entirely sure on what the changes to scripting are. Could someone give me a clearer picture? It was confusing enough before!

Incidentally, this might have something to do with my main problem. See, I've made my main character invisible on the first room, since it's my main menu. Only thing is, he now refuses to appear in the next room. I've done everything like I used to in the older versions, but he seems to be invisible. Any ideas?

Other questions:
1. What is the cheapest, easiest program to compile Flic animations?
2. How much does increased colour depth slow down a game?
3. How tall is Roger in pixels? I think I used to know this, but I can't seem to find it anywhere.

Thanks for your patience...

FS
UPDATE - See last post.
#7
I've got my hotspot. How do I get it to exit the game completely?

Also how do I launch the load box via a hotspot.

And furthermore how do I 'reset' the game via hotspot.
#8
Thankyou for those that registered their interest. Unfortunately, the project has folded. If mods would like to lock/delete this, please feel free.


Regards for your interest,


Phoenix Software
#9
I've got a table in the middle of a room, and I want a book on it. I couldn't understand why the book wasn't visible, so I removed the walk behind and... hey presto the book appears. But I need the book on top of the table, and it to be a walk-behind at theÃ,  same time. Any ideas?

Much appreciated

FinalSin
#10
Before you begin, please note that I am pretty sure this is a problem for this forum, and I have been unable to find another topic or a solution in the knowledge base because I simply don't know where to even start.

Here is what my designer wants:
you walk into a room. let's call it room 1. On the far side there is a door and it has a slit in it.
Objectives - Pass through room 2 into room 3.
Options - Option A) Walk into Room 2 straight away. There is a guard in the room and a conversation is kicked off (I can handle it from there).
Option B) LOOK through slit in door. Move to Room X where you view the guard (nice and simple, just a background i guess) then come back out. EGO makes a comment on there being a guard.
If you now enter the room the guard is not there. Apart from the obvious design gap that the guard walks away as soon as you look at it, how am I going to do this? Is it possible to do it with variables, or do i need to use timers, for instance ten seconds after finishing looking through the slit.

I'm sure its too simple to post here, and I apologise. Please help if possible.

FS
#11
Firstly, the download seems to have disappeared from the main site and I was wondering where it is still available.

Secondly, I have experienced problems with it in the past and would like some confusion cleared up for me. How exactly is the activated and used? Do scripts have to be run? Is it a standalone program exported with the finished game?

Many thanks,

FS


EDIT - Found a useful looking tutorial in the tech archive, but still no idea where to find the damn thing. Any help?
#12
Scripting is great! Really wonderful. But when I insert speech I can't seem to change the speaker to EGO. It mentions it in the tutorials, but doesn't clarify it much. Is it even possible?
#13
Okey doke, just started scripting, and doing well until I tried to get this script to run for one of my inventory items:

Code: ags
#sectionstart inventory6_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function inventory6_a() {
// script for inventory6: Look at inventory itemÃ,  Ã,  
Ã,  if (my_counter == 0) {
Ã,  Ã,  Display("Mufkin's big book of Secret Bookcase Passageways");
Ã,  }
Ã,  if (my_counter == 1) {
Ã,  Ã,  Display("Chapter 1 - Holes in bookcases often reveal passagewqays if the right book is put into them.");Ã,  
Ã,  }
Ã,  if (my_counter == 2) {
Ã,  Ã,  Display("Chapter 2 - Books are often cunningly titled to suggest their secret use.");
Ã,  }
Ã,  if (my_counter == 3) {
Ã,  Ã,  Display("Funny, that's all it says...");Ã,  
Ã,  }
Ã,  if (my_counter < 3) {
Ã,  Ã,  my_counter += 1;
Ã,  }Ã,  
}


then, I set the constant for my_counter at the top of the script. Waaay up the top around this bit:

Code: ags

#sectionstart game_startÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
Ã,  int my_counter
Ã,  }
Ã,  // called when the game starts, before the first room is loaded


No doubt I am doing something wrong - numerous messages appear, but the most common one is 'unexpected "}"'

any ideas?

#14
Two questions, nice and simple.

1. Where is the best place to start learning AGS scripting from the very bottom up.
2. How do I change the area of an item that is used to 'click' on hotspots in the game. At the moment, it defaults to the middle of the item, and I can make a cute little cross there, but I'd rather it was the top left. Is it possible to change it, I can't find it in the manual...
#15
This may be in the manual (apologies to the regulars) but is it possible, and if so how, to switch the player character? Changing inventory is not a problem.
#16
I need to set it so that when a *specific* inventory item is used on a hotspot an action is triggered, but as far as i can see the only thing i can do is set it so that when ANY item is used the action is triggered. One of the most basci things, I'm sure, but this has irritated me over and over again. Help, please.
#17
Hints & Tips / Ace Quest - I need blood!
Sat 03/04/2004 11:15:22
I have the nail, the soap, and the cup, and I need my blood in the MAll section of Ace Quest. Any help?
#18
I was recommended using the following script line to move my speech around

DisplaySpeechAt (int x, int y, int width, CHARID, string message)

But I want the dialog's scrpit to run at certain co-ordinates, I don't want to have to write it all separately in Script, not least becuase I'm not sure how to do this.

How do I have one character's speech displayed at a certain location if they are not visible? Should I merely change his starting co-ordinates?
#19
Christ! What the hell have I done!

OKay, I tried to see if I could move the text of an invisible player character so that it didn't put itself on the centre of the screen. "FinalSin." I tell myself, "All you need to do is change the starting room and the co-ordinates for the invisible character."
So I do that and a floating Roger appears in the top left of the screen.

Bugger.

Okay, so I go back and move it back to starting room (-1) and put the co-ordinates back. I go through and find the room... and he's still there.

Bugger.

Then I thought I'd get rid of the 'normal view' and that would solve the problem. For some reason I couldn't change it to 'none' so I fiddled with the player character.

Ah, big mistake.

Now my main character starts in the middle of the screen and not in a walkable area AND I can't do anything about it!

And my design team is going to kill me when they find out... :o

Help!
#20
Okay, now bear in mind I'm a beginner. I want to give the player inventory item 5 once he has finished Dialog Topic 2. But I don't seem to be able to - it won't accept
AddInventory (5)
Addinventory(5)
add-inventory 5

Any ideas?
SMF spam blocked by CleanTalk