Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: ahadHaYam on Thu 23/09/2004 12:27:21

Title: [SOLVED]importing function from rooms to global
Post by: ahadHaYam on Thu 23/09/2004 12:27:21
Hello.

Please can you explain how to import a function from a room script to global script(optionaly unsing the header).
I have read the manual and there is no explaination for this.

Thank you.
Title: Re: importing function from rooms to global
Post by: Khris on Thu 23/09/2004 12:32:00
There's no explanation because it is not possible (I think).
If you want a function to be accessible in the global and room script, why don't you just move over the code to the global script and import it in the room script?
Title: Re: importing function from rooms to global
Post by: SSH on Thu 23/09/2004 12:41:08
krismuc is right: the only method of using a generic room function in a global script is called "cut-and-paste". However, the CallRoomScript function cna be used to call a spepcificly named function in a room script. See the manual entry for that function for full details.
Title: Re: importing function from rooms to global
Post by: ahadHaYam on Thu 23/09/2004 14:47:27
Solved using CallRoomScript function,
thank you.