Help me please!!!

Sidrious play Help me! I got the Linux AGI_Studio (i like the LINUX ver. more then the other one), but the prioritys won't work (they do what they want). Can someone tell me what colour for what is? And please tell me some commands for logics. Like:

if (said("look")) {
print("blablaba");

or

How to wear anything

or

...more...


Thanks! :D
Zonkie Hi,

for priorities the colours are as follows:

4 = Maroon
5 = Purple
6 = Brown
7 = Grey
8 = Dark Grey
9 = Light Blue
10 = Light Green
11 = Aqua
12 = Red
13 = Fushia
14 = Yellow
15 = White

The priority that the ego has is dependent on his y-position, so the closer it is to the bottom, the higher its priority will be. It can get complicated fitting the priority in pictures so that they work with the ego, but it get's easier with more practice.

About logic commands: You best look at the help-file because that has a lot of commands in it.

You can use


if (said("look")) {
print("Something");
}


to give a general look command. Be sure to include look in your words.tok file along with other words for it like observe etc. If you want the player to be able to look at items specifically, use


if (said("look", "item")) {
print("Description");
}


It is easier if you do it that way and add many synonyms of the item in the words.tok file, because then the game will recognise many more replies than if you put the whole look-phrase into quotationmarks.

What do you mean about that wearing things?

Hope that helped,
Zonkie
Sidrious play Thanks!

But, i know how to do logics like:

if(said("-")) {
print("-);

I need logics to wear like mask or that a object that i pick up will be out the pic (first, how to put obj into a pic.).

And that about prio-colours:
It won't help me, cose i don't understand that!
Its so difficult. :-
Joey most likely the next thing you will want to do is add in an object. this is the code to do this:

animate.obj(o1);
load.view(view number);
set.view(o1, view number);
position(o1, y position, x position);
draw(o1);

this should work. for animate.obj(o1); you can have that object number from 1 - 15. 0 is used as ego. i believe this should place an object on the screen.
Sidrious play Thank u!

But do you know why the prios. doesn't work??

Can you tell me what colour for what is?? Like:

yellow = can't see the ego at the yellow pos.
black = can't walk thru that line.
...
Joey do you mean how to add priority lines into a pic? i had the same question. (btw, im 13 too.)

to add in priority lines, go into pic edit, and hit tab. the picture editing area should be redish. RIGHT click on black (this will block ego from walking on that line) and then left click line. click where ever you want it on the pic. you will get the hang of it.

for using an object, do this.

if (said("wear","mask")) {
if (has("mask")) {
print("Ok.);
erase(o0);
animate.obj(o0);
load.view(2);
set.view(o0, 2);
draw(o0);
}
else {
print("You dont have it.");
}
}

this should work.
Joey oh sorry about the colors. i dont really know about that. all i use is black, and thats for not walking through that.
Zonkie Sorry, didn't see the answers here, I posted about that mask think in the programming forum... :-
Andrew_Baker The lighter shade of blue sets ego_on_water. Unlike light green (which triggers the ego_touching_signal_line flag), the ego must have it's entire base line (the entire bottom of its view) touching light blue to be considered on_water. You don't have to use this to "change" your ego, as you can use it as just another trigger for an event.

To have an object in a room that disappears when you pick it up, try putting this code in your if (new_room) { block:

if (!has("thing")) {
animate.obj(o1);
load.view(XXX);
set.view(o1,XXX);
position(o1,XX,XX);
draw(o1);
}


Then, in the body of the logic, place this code:

if (said("get","thing")) {
distance(ego,o1,range_var);
if (range_var<=10) {
print("You pick up the thing.");
get("thing");
erase(o1);
}
else {
print("You are too far away.");
}
}

That should work pretty well.
jelleghys Just a little thing:
The formula used for calculating the distance is abs(x1-x2) + abs(y1-y2) where x1,y1 and x2,y2 are the co-ordinates of the center of the baselines of oA and oB.
=> Out of AGI studio help file


distance(ego,o1,range_var);
if (range_var<=10) {
blabla
}
=> this will probably work, but sometimes you might want to use this:
if (posn(ego,x1,y1,x2,y2)){
blabla
}


Just my $.02
Joey haha. 2 cents. i get it. ;D

anyway, i didnt know about all the different colors for priority. if i use green, can i have it set a different flag other than f3? cause if i had a big square of green, it would be wierd and mess up. (i dont think that made much sense)
jelleghys "Just my $.02"
=> got that from around this board I think...

Anyway, you can't set another flag, f3 is set by the interpreter, so... But what you can do, is use:


if (f3) {
if (posn(ego,x11,y11,x12,y12)) {
// blabla
}
if (posn(ego,x21,y21,x22,y22)) {
// blabla
}
if (posn(ego,x31,y31,x32,y32)) {
// blabla
}
if (posn(ego,x41,y41,x42,y42)) {
// blabla
}
}



A big square of green? filled up?
Andrew_Baker What you can do is

if (ego_touching_signal_line &&
!hold_on_a_sec) {
set(hold_on_a_sec);
//do whatever you need to do
}
else {
reset(hold_on_a_sec);
}

By using a second flag to control the signal line code, you can keep the signal line code from constantly iterating. This is a common problem where the ego gets stuck in a patch.

Something like that?
Sidrious play Can someone create a example-game for me? Wich contains prios., logics (if possible, some features)... :-\

I got the creater already 2 years, but i did nothing yet (because i don't know how it works).

Thanks a lot!

Have to go, be back tomorrow, if i can.
Zonkie For the logics, have a look at the template game. It has the main logics done and you only need to add the ones for the rooms. Have a look at the many tutorials that are out there, they give you a lot of advice on how to program specific things. The more practice you get the easier it'll be to write the room logics.

Otherwise load an existing game into AGI Studio. You can have a look at images with the priorities there, and also at views. There are some games and demos that have been released with a "source" folder in them, which means that in AGI Studio you will see the simplified code including comments and flag/object names. In games without that folder you only see the compiled logic, which is hard to follow especially if you're new to AGI.
Zonkie Okay, found the link :D.

http://members.ozemail.com.au/~ptrkelly/agi/docs/index.html

There you can find the tutorial game and the tutorials that go along with it. Work through them and you can get a good overview about how to do objects and doors in games.
Andrew_Baker My game, Voodoo Girl, is one of those games that provides a src folder, so you can view all my logics.

www.voodoogirl.cjb.net
Sidrious play Thanks Andrew!
Joey you could just open the src with agi studio, you dont need that folder. ::)

anyway, i didnt want that square filled in. i was just wondering how you could do it if you had multiple green lines on the one pic, or in the game. so if he stepped on one line, it would set this flag, if he stepped on the other, it would do this. but you can just use get.posn

but this green line thing will be helpful. i think i just found out what i can use it for in my game. stairs. i will put a green line going down the edge of stairs. if ego touches that, he falls. if that doesnt work, i will just use the if(posn(o0......

thanks for the help!
Andrew_Baker Sure, Joey, you can decompile most sources without the folder, but I like to provide the originals + the defines.txt file so that the logic code has rationally identified flags and vars. It is a great source of honor for me to help out someone with their code, but it really, REALLY annoys me when I have to decrypt a bunch of undefined vars. Would you rather have "done_flag","index" or would you rather have "f35","v120"?
Joey oh. thats how i can see which variable and flag does what. i didnt know that. thanks for telling me!
Zonkie If you open a game without the source folder you only see the compiled logic. But when you write the logic, you probably give names to objects, flags and variables that make it easier. For example, I always give objects names so that I can just refer to them like "animate.obj(name);", which I think it much easier than "animate.obj(o1);". Every time you compile a logic by pressing F9 or F10, AGI Studio changes what you wrote to what you would see without the source folder. That folder basically contains a "neat" copy of the logic for you to work on.
Sidrious play Got other questions.

How can i create sounds for AGI and add them in the game?? ???

What sound-creator is the best...easyest...?? ???

Is there a finished, good, "very" helpful, "How to create a AGI Game"- Tutorial?? ???

Can you all tell me what you like for a style?? (Leisure suit Larry, Kings Quest, Space Quest, horror, fungame, very hard games, wargames...) ???

And last question for today, What game is very good, for looking his logics, prios. and learn to do them?? ???

Many questions, I know. Sorry! I just love create my own games, and i want to do "good" games.
Zonkie To create sounds, you can either create or download MIDI files and convert them using mf2rol and rol2snd. You can find them in the tools sections of many AGI sites. Or you youse AGISE, which is a very good sound editor for AGI. It really depends what you think is easiest. If you know how to write music, use a good MIDI notation program and convert the file or use AGISE, otherwise download MIDI files and convert them.

There are lots of good, finished tutorials. Work through the ones I mentioned earlier, they will give a very good background on how to create a game. Otherwise have a look at the tutorial section on Nick's page.

For styles it depends a lot on every person. I prefer games like LSL, but that's only my personal opinion.

I would suggest looking at many games to see some pictures and priorities etc. There are a lot of really good fanmade games and demos out there, just download them and have a look at them. Also load some of the original Sierra games into AGI Studio to have a look at them.

Don't put yourself under the pressure to release an awesome game as quickly as possible. Take your time, maybe work on a smaller project to get used to AGI, and then start a bigger project with the knowledge you gained in doing the first project.
Kon-Tiki What Zonkie forgot to tell you, is that you can only get AGISE from my site. I surely hope Brian'll put it on his site too someday, 'cause most of the people go there for their tools.

-Kon-Tiki-
Andrew_Baker I totally agree with zonkie in that you shouldn't put yourself under pressure to release a masterpiece right at first. In fact, why don't you try putting together a really well-polished five or six room game first? Use it to actually learn the language and structure your project.
smartguy240 I am with Andy...you sould really actually DO the game first..and then Perfect it...or else you wont have room for prefection ;)
Sidrious play Thanks guys! ;)

So, i download AGISE first, then do a little game.

If i got another question, i'll post it in here...

Maybe, i don't know how to use AGISE, but i'll download and try it first.
Sidrious play 5 minuits later, i am back again.

Got another question.

How the AGISE works??
I mean, how can i use the notes c to H3?
Kon-Tiki In the middle left of the screen, there's a box that says:
ID (or something like that)
You can fill in the name of the note there, where the letter stands for the note (C == do -> If I'm not mistaken, D == re, etc.) and the number after it stands for the octave (don't know if that word exists, but you get the meaning ;D )
E.G.

C0 == lowest possible do
C1 == do one range higher

So, fill in the name of the note (like explained above) where it says 'id'.

-Kon-Tiki-
Sidrious play Ah! Thanks!

But, you did something wrong.
There are 3 foulders:
-ID
-Note
- ???

I have to put any number in the ID-case, a note in the folder "Note" and any number in the other folder.
Am i right?

Thanks anyway!! ;)
Kon-Tiki Uhhhmm, yeah. Took a look at it, and seems as if it's a bit different.

ID


0 == C
1 == C#
2 == D
3 == D#
...
59 == B-4


NOTE


C == do (I think)
C# == do cross (I think)
etc


OCTAVE


0 == Lowest octave
1 == One octave higher
...
4 == Highest octave


-Kon-Tiki-

Sidrious play Yo, thats right!

Ah! In the last case are the octaves. Thanks!
-Are there realy 4 octaves? I thougt there are
only 3...

Now i know how to create sounds. Thanks!
Sidrious play How do i add snds.?
Rono Hi, everybody! Kon-tiki, how are u doing?
I thought I could clear up some things about AGISE (since I wrote it...), or actually about music...
In MIDI music there are 11 octaves (! not only three),
but AGI only supports 5 octaves. An octave, by the way, is 12 notes, from one C (yes, it's DO, kon-tiki) to the next C. (BTW, in hebrew, we also use the latin names DO,RE,MI. But C,C#(that's pronounced C Sharp),D is the english naming set...)
In AGISE, you don't have to fill the three fields, but either the ID field, or the NOTE and OCTAVE fields.
Use whatever is more convinient for you...
If you want to put a note according to its height, use the ID field. If you already have a note, and you want to raise it a few octaves, use the OCTAVE field...

In any case, you realy should read the help (F1) to know how to use it... it shows some nice shortcut keys...

Again, thanks for using my program... I hope you enjoy it... ;D