AGI Tutorial

Seb Please do not flame me for posting this but I would really appreciate if someone had a AGI Tutorial on the logic and sound. I'm making a game and I would like to learn its logic commands. I  seen some of the commands and do not look to compicated. Kinda like C :).

Seb
AGI1122 Welcome Seb.

Try this link and you will see a list of AGI Turorials. Including my own. ;D



Hey Nick maybe you should make the tutorial list sticky so it stays at the top for everyone to read. The same goes for the AGI game list.
Seb Does anyone have a copy of this?

Tutorial Game - A game created by Peter Kelly which is great for those learning AGI.

I tried to download the one of agisci.cjb.net but it's not there  >:(
Can anyone send it to me at scooter_6969@hotmail.com.

Thanx,
Seb
sonneveld I was thinking about it but I didn't want to annoy people with all these stickies everywhere.  The best compromise I could think of was one single sticky post, with links to the other threads.

what do you think?

- Nick
AGI1122
Does anyone have a copy of this?

Tutorial Game - A game created by Peter Kelly which is great for those learning AGI.

I tried to download the one of agisci.cjb.net but it's not there
Seb Does anyone have PICEDIT? agisci.cjb.net desn't have it and lost of the links givin' to me don't have a working download of it. Sorry if I'm getting demanding. I'm just motivated cause I'm getting the hang of it.

Seb
Robin_Gravel You can find picedit on my site.

Robin Gravel
AGI1122 Hey Robin you should probably give him a link so he knows where to go.
Robin_Gravel Because Seb cannot click on the house icon below the Naturette's picture?

Here we go:
http://agisite.multimania.com/agisite.htm

Robin Gravel
Seb Found it. I'm using all the info given to me but I still cant create a new object that works. I got a paper and all that happens when I say "take paper" is that he takes the only working object in the tutorial, the radio. Can anyone tell me whats wrong. Here's the code.


// ****************************************************************************
//
// Logic 2: Item tutorial room
//
// ****************************************************************************

#include "defines.txt"

#define radio o1

#define paper o2


if (new_room) {
 load.pic(room_no);
 draw.pic(room_no);
 discard.pic(room_no);
 set.horizon(50);

 animate.obj(radio);
 load.view(2);
 set.view(radio,2);
 set.loop(radio,0);
 set.cel(radio,0);
 set.cel(radio,0);
 position(radio,43,104);
 set.priority(radio,11);
 ignore.objs(radio);
 stop.cycling(radio);
 v255 = 2;
 if (obj.in.room("portable radio",v255)) { draw(radio); }

 animate.obj(paper);
 load.view(5);
 set.view(paper,5);
 set.loop(paper,0);
 set.cel(paper,0);
 position(paper,49,118);
 set.priority(paper,11);
 ignore.objs(paper);
 stop.cycling(paper);
 draw(paper);


 // The next 6 lines need only be in the first room of the game
 if ((prev_room_no == 1 ||    // just come from intro screen
     prev_room_no == 0)) {    // or just started game
   position(ego,120,140);
   status.line.on();
   accept.input();
 }

 if (prev_room_no == 3) {
   position(ego,150,114);
 }

 draw(ego);
 show.pic();
}

if (said("look")) {
 print("This is the room for the item tutorial.");
}

if (said("get","radio")) {
 v255 = 2;
 if (obj.in.room("portable radio",v255)) {
   if (posn(ego,37,111,51,124)) {
     print("Ok.");
     erase(radio);
     get("portable radio");
   }
   else {
     print("You're not close enough.");
   }
 }
 else {
   reset(input_parsed);    // let logic 90 take care of it
 }
}

if (said("look","radio")) {
 v255 = 2;
 if (obj.in.room("portable radio",v255)) {
   print("There is a portable radio sitting on the bench.");
 }
 else {
   reset(input_parsed);    // let logic 90 take care of it
 }
}



if (said("take","paper")) {
 v250 = 2;
 if (obj.in.room("prep. papers",v250)) {
   if (posn(ego,37,111,51,124)) {
   print("Sure.");
   erase(paper);
   get("prep. papers");
 }
 else {
   print("You're not close enough.");
 }
 }
 else {
   reset(input_parsed); // let logic 90 take care of it
 }
}

if (said("look","paper")) {
 v250 = 2;
 if (obj.in.room("Prep. Papers",v250)) {
   print("There is the Prep. Papers hung under the bench.");
 }
 else {
   reset(input_parsed);    // let logic 90 take care of it
 }
}

if (ego_edge_code == left_edge) {    // ego touching right edge of screen
 new.room(3);
}

return();


Seb
AGI1122 First of all the paper is not drawn on the screen, have you drawn it yet? Secondly is the word list have the word paper in it and in a new group? And thirdly did you create the object in the object editor.
Seb Yes, yes and yes. But now when I says "get paper" he says "You can't get that now!".

Seb
AGI1122 According to the code you put there the paper is not drawn on the screen unless you drew it in place of the radio. Second of all you need to change v250 to v255 like the other one has.
Robin_Gravel I'm too late to help Seb but for everyone else, I fixed the broken links on my site.

Robin Gravel
AGI1122 Seb:
If your still looking for picedit it is included with the AGI Studio file on my web site at my web site at It is in the AGI Utilities section.

Robin:
I didn't know there was any broken links on your site. Well glad their fixed I visit it every now and then to see if you have any new AGI games.
Seb I just watched the amazing field goal by the Patriot and I just got my item to work. ;D

Seb
Robin_Gravel Hi AGISCI.

If Seb can not downloaded pic editor from my site, that's because the link is broken. I fixed it.

I just found a new game but I need to verify it first before I put it on my site. It seen like a complete game not a demo. I don't tell you about this agi game untill I update my site... at the end of this month.

Eh! Eh! Eh!

Robin Gravel
AGI1122
I just got my item to work.

Ok good. If you need any help just ask.

I just found a new game but I need to verify it first before I put it on my site. It seen like a complete game not a demo. I don't tell you about this agi game untill I update my site... at the end of this month.

Cool can't wait to see it.
Seb I have 2 new problem.

1. How do you make a new person that has AI intelligence.
2. How do you get a "clip" for the death. I have a death
   senquence that makes my guy blow up.

Can anyone help.

Seb
AGI1122 1. You have to program some sort of AI.

2. You draw the animation and when the time comes draw the animation in replace of his walking view.

I suggest you study a few games and see how they work to learn how to do certain things.
Nailhead
1. How do you make a new person that has AI intelligence.


You may be talking about when a character wanders around by himself?

In that case use:

wander(oA);

Description
Object oA wanders randomly around the screen.

Although I wouldn't wall 'wander' intelligent  ;D