[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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/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 - Scripting Issues

Scripting Issues

Have any technical questions or suggestions? Post them here.

Scripting Issues

Postby xxjaminko » Thu Aug 04, 2011 3:24 am

Hi there! As the topic suggests, I have some scripting issues. ^^;
I read about scripting on the help page, but I think I was just confused more... >w< I'm not sure how to create a script (I can really only do HTML). I (think I) understand that I write the script (i.e. on Notepad) then save is as an Angel Script file .as and (maybe) put it in the scripting folder of novelty (if needed so). I'm just confused on how to write them. <( ; n ; )>

I want to make a couple scripts actually (you don't have to write them for me, just explain how).

1. Make the "x" button object I created close the text box (I know this is in the template, but I can't find the script for it as a reference)

2. Make a movable bar object to adjust the transparency of the text box. (Is this also possible with text speed?)

Thanks! :3
User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am

Re: Scripting Issues

Postby Avaible » Thu Aug 04, 2011 1:24 pm

Welcome to the forum and Novelty.
If you want to write a script there's an easier way to do it.
Open Novelty, open the Script Editor ('window' tab) and click on the white little egg-symbol. Now you can write your script directly in Novelty.

Also, if you use the template or the Sample novel interface, the script Sample UI script will appear in the Script Editor. That's the script which toggles the text-box' visibility.

As for the second script (speed), helpful sites would be these: , .
Since the speed of the text is determinded by the text-object you're using (you can change the default setting in the property inspector of your text-object) you will need to use that text-box in your script, too.

You know how to use handles?
Text@ txt = Scene.GetObject("name of your text-object") as Text;

Now you can use txt further in your script. For instance: txt.visible = false; <-- this would make your text-object invisible.

. There's also opacity which you could link to your bar using advanced property binding, a topic which was discussed several times recently, you should easily be able to find it in the forum.

Now, that's all the help I can give you for now without writing part of your script for you, but of course, should you not understand something, ask away. If you decide you need help with coding the scripts that's no shame either, and I'll help you as good as I can.

Good luck with your novel.
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Scripting Issues

Postby xxjaminko » Thu Aug 04, 2011 11:44 pm

Thank you! I'll try that out, and if I run into more problems I'll ask more. :3
User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am

Re: Scripting Issues

Postby xxjaminko » Sat Aug 06, 2011 3:21 am

User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am

Re: Scripting Issues

Postby Avaible » Sat Aug 06, 2011 5:36 pm

User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Scripting Issues

Postby xxjaminko » Sat Aug 06, 2011 6:15 pm

Ah! Thank you so much! I'll continue to look into the text speed topic; I've played a couple games I found in the expo with that feature, so I'll ask around. Thanks again ;3
User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am

Re: Scripting Issues

Postby Avaible » Sat Aug 06, 2011 6:43 pm

As long as they were made with Novelty, I would like to know how they did that.
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Scripting Issues

Postby xxjaminko » Sat Aug 06, 2011 6:47 pm

Oh, sorry, I just realized that was done with Ren'py (the topic about posting a Ren'py game). My bad!
User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am

Re: Scripting Issues

Postby Avaible » Sat Aug 06, 2011 6:50 pm

^^
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Scripting Issues

Postby xxjaminko » Sun Aug 07, 2011 11:57 pm

Haha I'm back ^^;
So thanks so much for the opacity code. It works well. I'm just confused on something... how can I set it so that it starts out not at 100% transparent? Every time I test the game I have to go into the configuration and change it myself. I'm not sure if I have to change the value of the slider (my min and max and 0 and 1 as you said), but when I changed it to 1 nothing happened.
User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am

Re: Scripting Issues

Postby Avaible » Mon Aug 08, 2011 11:26 am

In the property inspector above Min/Max you should have a third field called 'value'. That's the default setting, so if you want to always have the object, say, only 50% transparent you would change that setting to 0.5
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Scripting Issues

Postby xxjaminko » Mon Aug 08, 2011 2:31 pm

That's what i thought... I did try setting the value at 1 then .5 but whenever I tested the game it started out at 0 and I had to adjust it in-game.
User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am

Re: Scripting Issues

Postby Avaible » Mon Aug 08, 2011 2:58 pm

You're right, I tested it and got the same result. This means it's a bug or something still missing, you should report it in the 'What's missing' thread here in this subforum.

Meanwhile, although it is by far not the ideal solution, you can use the 'Set game variable' action at the start of the page to Assign .5 to pace. It's not as nice, I know, but at least it does the job.
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Scripting Issues

Postby xxjaminko » Mon Aug 08, 2011 9:25 pm

Thank you, I'll try that for now and report it to that topic.
User avatar
xxjaminko
 
Posts: 25
Joined: Thu Aug 04, 2011 3:15 am


Return to Support & Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron