Author Topic: Help me please!!!  (Read 9846 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwarfy

Help me please!!!
« on: November 07, 2002, 01:32:39 PM »
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


I feel the power! It's in my shoes! *c-walking*

Offline Zonkie

Re:Help me please!!!
« Reply #1 on: November 07, 2002, 02:16:04 PM »
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

Code: [Select]
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

Code: [Select]
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

Offline Dwarfy

Re:Help me please!!!
« Reply #2 on: November 07, 2002, 02:35:09 PM »
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.  :-[ (and i'm a 13 years old swiss kid!  ;) )
I must have to ask my brothers what that y-prio. from the Ego means...

Thanks anyway!!  :)

p.s.: About your question. I wanna know how to do logics like that:

if (said("wear","mask")) {
  if (has("mask")) {
    print("Ok.");
    load.ego(o2);
    set.ego(o2);
    }
    else {
      print("You don't have a mask");
    }
}

So, that i can wear a mask i found (or anything else). This logic that i scriped here won't work.

Do you know what i mean?
« Last Edit: November 07, 2002, 02:41:10 PM by Sidrious play »
I feel the power! It's in my shoes! *c-walking*

Joey

  • Guest
Re:Help me please!!!
« Reply #3 on: November 07, 2002, 02:36:46 PM »
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.

Offline Dwarfy

Re:Help me please!!!
« Reply #4 on: November 07, 2002, 02:45:17 PM »
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.
...
I feel the power! It's in my shoes! *c-walking*

Joey

  • Guest
Re:Help me please!!!
« Reply #5 on: November 07, 2002, 02:58:50 PM »
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

  • Guest
Re:Help me please!!!
« Reply #6 on: November 07, 2002, 02:59:42 PM »
oh sorry about the colors. i dont really know about that. all i use is black, and thats for not walking through that.

Offline Zonkie

Re:Help me please!!!
« Reply #7 on: November 07, 2002, 03:33:20 PM »
Sorry, didn't see the answers here, I posted about that mask think in the programming forum...  :-[

About the colours: Black makes objects stop all the time. A blue line doesn't allow objects to cross unless they can ignore blocks("ignore.blocks(object)"). If the line is green, objects can cross it, but set the flag f3 when the object touches it. This is useful for events that only happen when the player goes into one area of the room. There's also another one that has something to do with objects changing once they cross it, but I'm not sure about how to use that one.

Offline Andrew_Baker

Re:Help me please!!!
« Reply #8 on: November 08, 2002, 04:00:31 AM »
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.
I hope you realize that one day I will devour the Earth.

Offline Jelle

Re:Help me please!!!
« Reply #9 on: November 08, 2002, 04:19:47 AM »
Just a little thing:
Quote
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
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Joey

  • Guest
Re:Help me please!!!
« Reply #10 on: November 09, 2002, 12:15:33 PM »
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)

Offline Jelle

Re:Help me please!!!
« Reply #11 on: November 09, 2002, 12:34:09 PM »
"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:

Code: [Select]
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?
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Offline Andrew_Baker

Re:Help me please!!!
« Reply #12 on: November 09, 2002, 12:37:45 PM »
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?
I hope you realize that one day I will devour the Earth.

Offline Dwarfy

Re:Help me please!!!
« Reply #13 on: November 09, 2002, 05:09:09 PM »
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.
« Last Edit: November 09, 2002, 05:12:33 PM by Sidrious play »
I feel the power! It's in my shoes! *c-walking*

Offline Zonkie

Re:Help me please!!!
« Reply #14 on: November 09, 2002, 05:17:43 PM »
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.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.039 seconds with 16 queries.