about ags scripting

Started by stormboy, Sat 06/09/2003 10:35:47

Previous topic - Next topic

stormboy

Hi, I'm trying to understand how to approach scripting for AGS.

There seem to be several places where you can add script stuff, and sure, the manual and help file are full of funky commands that can be run through a script, but in the help file and manual, it doesn't really tell a newbie like me
where I should try to put the different script ideas or functions.

There's the global script, the room scripts, interactions-run_scripts,
and so on, let alone the gui functionality. But I'm confused as to how each
of these scripting opportunities relates to each other and the final run time
game script.

I'm still enjoying the chm file and the manual but almost all references to of script commands fail to tell one which place to try and use the commands.

Can anyone provide an overview of how to get a handle on how the scripting
should be approached.

thanx

Monk

however you have to learn to interact with those script! and youll find ittll be easy for you if you have do that!

learn from the AGS hep file! that thing helps me much!

MORE POWER!

i hope im helping you!

Jam Torkberg

As far as I am to understand, it goes down like this:

First, we have the Global Script.  This is always being run, no matter where in the game you are.  It would be very possible to code the entire game here, but that could get very messy and hard to organize, so there are separate room scripts.

The Room Scripts, quite obviously, will only run while the character is in the room they pertain to.   And contrary to what you have posted, the interactions-run scripts are placed here.  For example, if in the interactions menu you tell the game to run a script when the character looks at a blue cup, it will automatically appear in the room script as
Quotefunction objectX_a() {
 // script for objectX: Look at object
}
where X is the object number.  The “a” is to provide different scripts for the same object, such as interact, speak to, and so on.

Also, we have the script header.  This is included in every script in the game, and is useful to import functions or variables.  Do not actually place functions or variables here.

And finally there is the GUI script.  No matter how many GUIs you have, there will all share the same script.

I hope that helps.
"Now it's over I'm dead and I haven't
done anything that I want
or, I'm still alive
and there's nothing I want to do."

stormboy

ok thanx for that JT & okii, your replies were something at least to think about.

Are you saying that certain scripting is added from one script to another
at design time?

Question: Is a room script sort of a giant room function?

I'll be back~

Ishmael

Room script contains all the script you issue for an object, hotspot or room interaction, with the 'Run script' intreaction event. That's why I allways use it, It lets me edit all the interactions the same time, without having to browse through all the dialogs and stuff.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk