[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Novelty forum • View topic - Teach me how to script with Objects

Teach me how to script with Objects

Have any technical questions or suggestions? Post them here.

Teach me how to script with Objects

Postby OtakuD50 » Wed Dec 28, 2011 12:00 pm

User avatar
OtakuD50
 
Posts: 9
Joined: Sun Dec 25, 2011 3:43 am
Location: Snowman secret meeting

Re: Teach me how to script with Objects

Postby Avaible » Wed Dec 28, 2011 1:42 pm

For all the functions shown in the Object-page of the reference you need to tell the compiler which object you mean to use it on.

Take an Image for example:
Image@ brdr = Scene.GetObject("Sample border #2") as Image; //Borders are also handled as images

Once you've done this you can use brdr like this:

brdr.Show(3.0f); //brdr will fade in over three seconds
brdr.Hide(2.0f); //brdr will fade out over two seconds

For using Exit() you would have to refer to the whole novel (since it's listed in Novel):
Novel.Exit();

Rather easy, ain't it?
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Teach me how to script with Objects

Postby OtakuD50 » Wed Dec 28, 2011 10:07 pm

User avatar
OtakuD50
 
Posts: 9
Joined: Sun Dec 25, 2011 3:43 am
Location: Snowman secret meeting


Return to Support & Development

Who is online

Users browsing this forum: No registered users and 6 guests

cron