dialog, and acess number

Started by ronan48880, Mon 14/07/2003 00:34:40

Previous topic - Next topic

ronan48880

I looked at the help for adding script to dialogs and i just don't get it. I want to have them teleport to a different room based on the answer, but i just can't understand how to punch it in as it says in the help manual. also, in the demo game it has the acess card slot and number entry. i have the card but just for curosity, what is the code number?

Minimi

add in the dialog script where you for example do answer 1 :

Set-GlobalInt 1 1

This will set global value 1... to 1

and then if globalint1 == 1;
newroom (2)

ronan48880

#2
I realize that you are trying to say that i should know this stuff... but i don't. i don't know what more than half of what you told me to do. I don't even know how to add any dialog and the manual looks like french to me. and so i don't have to post another thread, can you add turn style fighting to the games? and what is that globel int?

MillsJROSS

You're going to have to elaborate a little more for some help. Will the guy teleport right after he answers or perhaps after he uses a teleporter machine. (It would require two different codes). As far as the last part of your question, I've never played the newest Demo AGS, so I am currently, unable to answer you at the moment.

-MillsJROSS

ronan48880

The guy would teleport right after he answeres the question. And also, when I tried scripting the PlayVideo ("intro.mpg", 1, 1); command. I tried putting it into different places, in the main folder, the folder for the game, and the compiled folder. Could you tell me why it isn't working?

Wolfgang Abenteuer

To be able to do more elabourate events within a dialogue, you need to create a script.  Create the following function at the end of your global script:

function dialog_request(int value) {
}

That allows you to do something more advanced in the dialogue scripts than just talking.  Now, when you have a dialogue option that you want to do something special on (like teleporting to another room), you'll have to set up the dialog with a run-script command.  Your dialogue topic script should look something like this:

@S
@1
character: "What is happening to me?"
run-script 1

What that does is when the player selects dialogue option #1 from this particular topic, the person named "character" (the character's name is what you set it up as in the "Characters" folder) will say the line, "What is happening to me?", and then it will run script #1.  Script #1 is the script that is defined in the function dialog_request you set up earlier.  It should now look like this:

function dialog_request(int value) {
if (value == 1) {
NewRoom(2);
}
}

Note that the integer "value" is set at 1, which is the same number you entered in the "run-script" command in the dialogue script.  If you type "run-script 2" instead, then you would need to change the statement in the function to "if (value == 2) {", and so forth.  The NewRoom(2) will place the character in room 2.

Obviously, all of these numbers are changeable, so if you wanted them to go to, say, room 10, you would type NewRoom(10); instead.  The important thing to note here is that the run-script value and the function dialog_request value must match for it to work.  If they are different numbers then AGS won't know what to look for.

~Wolfgang

ronan48880

#6
Now i know i seem dense, but where do i put in the global script? And better yet, what is a global script? and could i set it up so that at a certain option they chose it would play a certain movie? If so how?

Minimi

first of all i think you didnt do the tutorials. Go to www.agsforums.com and click on docs and follow the first 2 links to beginner and scripting tutorial. That'll help you alot, instead of asking anything and everything in the forum! have phun!

ronan48880

yay! i can do lots now that i took that tour, and it helped a lot! even though you were being short with me (you know who you are) it was a great idea! thanks! by the way, how many rooms are in a normal game?

Minimi

Quote from: ronan48880 on Thu 17/07/2003 01:19:57
yay! i can do lots now that i took that tour, and it helped a lot! even though you were being short with me (you know who you are) it was a great idea! thanks! by the way, how many rooms are in a normal game?
great that it helped you! the number of rooms depends on what you want to make. Check the games at the page. Short games, can have 1 or maybee 4 rooms. Medium length games though.. come close to 20 or 30 rooms. If you want to make a full game like the professionals.. you must count on 200 ! I'm working on my first 3 games. the first game PhoneBooth is a game of 3 rooms... Sam&Moos got 24 rooms, and Undeniable will have over 400 rooms, but that'll take me awhile! GL!

SMF spam blocked by CleanTalk