Author Topic: o this sounds real stupid: intro room and speech variables  (Read 3541 times)  Share 

SGK

  • musician rabbibunny
    • I can help with characters
    •  
    • I can help with AGS tutoring
    •  
    • I can help with voice acting
    •  
well how do i make the game start with the intro.crm room? ive saved the room as "intro" and it was supposed to start in it, isnt it?

i should define that the player starts in intro? but how? it doenst acccept letters! ???

****===****

And how do i set variables using a dialog scripting? sounds easy and all (its in thte manual too i know) but look at its explanation:

"set-globalint GI VAL

Changes text script GlobalInt number GI to have the value VAL. This is equivalent to the SetGlobalInt text script command, and allows you to quickly set things without having to go through a run-script just to set an int value. "

The name of the global variable im using is QUEST. So ive done this in the dialog:

// dialog script file
@S  // dialog startup entry point
EGO: Hi!
Q: What are you? A Sphero?! HAHAHA
EGO: Im an owl... Well:
set-globalint QUEST 511
return

and it doenst work. NOTE: 511 is the number of the global message i want to change to. The normal value of QUEST is 510 and i want to change it to 511! its simple someone help me!
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Just set the player character to start in room 0, then the game will start in intro.crm, that's how the engine was designed.

For the globalint problems, there are actually 50 globalints already defined by the engine, not something you defined yourself in the scripts.

So, for example if you want to set globalint #6 to 500, just do in dialog script:

set-globalint 6 500

I'm not sure but I think you cant use variables for the globalint # in dialog scripts.

For more info on globalints and how to manage them in text scripts, read the SetGlobalInt() and GetGlobalInt() function entries from the manual.

SGK

  • musician rabbibunny
    • I can help with characters
    •  
    • I can help with AGS tutoring
    •  
    • I can help with voice acting
    •  
ive read it all and put an excerpt from it  :P

look:
"set-globalint GI VAL

Changes text script GlobalInt number GI to have the value VAL. This is equivalent to the SetGlobalInt text script command, and allows you to quickly set things without having to go through a run-script just to set an int value. "

tahts whats in the manual about dialog scripting functions.

now i wanna know whats the GI thingy!

in ur example you said 6, but how do i know whats the number of the variable? it doenst have numbers! its just a list of all existing ones!

--==--
Ive set to room 0 but it appears an error message!
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

Scorpiorus

  • 100101101010b
Ah, you probably add your global variables in the interaction editor but they are different than the "real" global variables that are operated via Set/GetGlobalInt() functions. Unlike interaction editor global variables these are referenced by numbers:

SetGlobalInt(3, 100);
Sets the value of global int number 3 to be qual 100.

It is them you have to use in the dialog script.

Quote
Ive set to room 0 but it appears an error message!
What error text message did you get?
« Last Edit: 25 Feb 2004, 21:37 by Scorpiorus »

SGK

  • musician rabbibunny
    • I can help with characters
    •  
    • I can help with AGS tutoring
    •  
    • I can help with voice acting
    •  
ok thanks!

heres the message:

Room 0 script line 5:
ERROR: a text script run in the PlayerEntersScreen event caused the screen to be updated. if you need to use Wait(), do so in After Fadein.

Ive fixed it already now thanks!

hey! wait! how do i set real global variables? ill have to use scripting??  
« Last Edit: 26 Feb 2004, 00:52 by SGK »
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

Scorpiorus

  • 100101101010b
Quote
hey! wait! how do i set real global variables? ill have to use scripting??
Yes, use SetGlobalInt() function:

SetGlobalInt(1, 5);

i.e. Set global int number one = 5

~Cheers

SGK

  • musician rabbibunny
    • I can help with characters
    •  
    • I can help with AGS tutoring
    •  
    • I can help with voice acting
    •  
ok thanks again, ive discovered that when the autocomplete box appeared with SetGlobalInt.

But the problem now is that how do i say to the program that the number or the variable is the global message?

EDIT: Ive found the solution! thanks!

Need now help in: dialog requests. for the run-script 1 , i use
function dialog_request (int dialog) {
if (dialog == 1) {


but what do i use for another dialog request?
« Last Edit: 27 Feb 2004, 00:08 by SGK »
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Just add more contents to dialog request if you want more.

eg.

function dialog_request (int dialog) {
if (dialog == 1) {blah bla bla
} else if (dialog == 2) {blah bla bla
} ...

Then it will respond to run-script 2, ... etc