Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Rocco on Thu 08/04/2004 16:12:32

Title: trace and access variables?
Post by: Rocco on Thu 08/04/2004 16:12:32
hi all,

2 - questions:
how i can trace variables, during runtime?
and
can i access a roomvariable from another room?
for example, if i have a roomvariable for a door.
i need the status (open or closed) in both rooms, where the door come in use.

thx greets rocco

ps: please correct my english, if its not accurate and if you have enough time  ;)
Title: Re:trace and access variables?
Post by: ElectricMonk on Thu 08/04/2004 16:33:10
Quote
can i access a roomvariable from another room?
for example, if i have a roomvariable for a door.
i need the status (open or closed) in both rooms, where the door come in use.

I think you'll need to use a global variable for that.

And your English is fine. ;)
Title: Re:trace and access variables?
Post by: Scummbuddy on Thu 08/04/2004 17:31:04
and to trace a variable, i think you'll want GetGlobalInt, theres more info in the manual, I can't post it, since im not on my home computer. And I also think your english is very good.
Title: Re:trace and access variables?
Post by: Rocco on Thu 08/04/2004 22:46:29
thanks, i thought it works like the defined ones, @overhotspot@ @scoretext@,
but that dont works with normal variables, so i have to use display instead.
access roomavariables from outside is not possible, you say.

@ElektricMonk
i want to partizipate in this months ags contest, can you help me correcting and translating text sequences if i can finsih it, cause im from austria and i recognize that you also speak german.
Title: Re:trace and access variables?
Post by: ElectricMonk on Fri 09/04/2004 04:28:54
Quote
@ElektricMonk
i want to partizipate in this months ags contest, can you help me correcting and translating text sequences if i can finsih it, cause I'm from austria and i recognize that you also speak german.

Sure, if the game is not too long, send me a message when it's done. Just leave me some time before the deadline of the contest, so I won't have to translate the whole thing in one evening or so... ;)
Title: Re:trace and access variables?
Post by: Rocco on Fri 09/04/2004 23:53:24
Quote from: ElectricMonk on Fri 09/04/2004 04:28:54

Sure, if the game is not too long, send me a message when it's done. Just leave me some time before the deadline of the contest, so I won't have to translate the whole thing in one evening or so... ;)

thanks,
the game is short, nobody can make a very long game in 20 days (except one without a job:).
I will hurry up, and hopefully need only grammatical corretions and not a full translation.
Title: Re:trace and access variables?
Post by: Scorpiorus on Sat 10/04/2004 18:39:41
Quotehow i can trace variables, during runtime?
Currently, there is no way to trace them with some built-in debugging mechanism, so yes using a Display() function or some sort of a debug GUI is the only possibility.

Quotecan i access a roomvariable from another room?
you can't but you can either make a use of GlobalInts as ElectricMonk suggested or declare a global variable and export it so different rooms can share it:

main global script:
int shared_var;

end of main global script:
export shared_var;

script header
import int shared_var; //thus it will be imported into every room

~Cheers