[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/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 - Condition problem

Condition problem

Have any technical questions or suggestions? Post them here.

Condition problem

Postby Minikomicweb » Sat Oct 22, 2011 9:19 pm

Hello Novelty users.

First of all, I want to thank the one or ones who had the great idea of creating this program. I'm using this program since the last week and I'm creating a story right now. Thank you very much. :D

Okay, my problem is here, I'll be short:

I have a problem with something about "if/choices/true-false" stuff in the story. I'll describe it, our first choice, in the first chapter, the main character has to choose between:

-Studying
-Play videogames

That's all, end of the chapter, only a few differences in the text in two threads, depending of our decision.

The problem is in the next chapter: he goes to school and I want to create different sentences depending if we picked the "study" option or not.

-If the player chose "Studying", he'll do the test perfectly.
-If the player chose "Play videogames", he'll do the test regularly.

Only I want to create different sentences depending of the first decision, and after that, we continue the story normally.

I tried with "branch" option, I tested it, and it didn't work at all. Probably I've used it in a wrong way or something.

What should I do to make these sentences different depending of our first decision? If it's possible with threads, better.

I hope for an Answer.
User avatar
Minikomicweb
 
Posts: 25
Joined: Sat Oct 22, 2011 9:04 pm
Location: Spain

Re: Condition problem

Postby Avaible » Sun Oct 23, 2011 12:10 am

Moin and welcome to Novelty and it's forum :)

Let me help you a bit; this is one way of several to do it (and it looks more complicated than it is):
First page Action window
Show menu with Option 1
Phrase 'study'
Event 'Set variable'
variable name 'studyvar'
Operator 'Assign' or 'Add'
Value '1'
Condition 'No condition'
Option 2
'Videogames'
'Set variable'
'videovar'
'Assign' or 'Add'
'1'
'No condition'

Now, after the Show menu action:

Branch with:
Condition 'studyvar is equal to 1 and videovar is not equal to 1'
When true 'Play thread' 'studythread' When false 'play gamingthread'
You see, I work with threads here.

In the next page (or any next page) you can work with the variables 'studyvar' and 'videovar' again using a Branch-action to play different threads for the different outcomes of the test.

Hope this helps you a bit, but if there're still questions left just ask.
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Condition problem

Postby Minikomicweb » Sun Oct 23, 2011 1:00 am

Thanks for the reply, Avaible! :D

But... it seems that I'm having more problems than before... I think.

I did what you said, but the only problem is that the path of "playing videogames" happens, no matter which decision you're making -I've tested it many times.

I'll show you some screencaps I've done (I'm warning that the game is Spanish, but when it's finished, I'll make the game in English :P ):

This is when I've modified the menu, like you said (I tried with Assign and Add):
Image

And the branch:
Image

Maybe I've got a mistake doing this...

Should I try another different way?

Edit: I'm thinking in changing it into English language.
User avatar
Minikomicweb
 
Posts: 25
Joined: Sat Oct 22, 2011 9:04 pm
Location: Spain

Re: Condition problem

Postby Avaible » Sun Oct 23, 2011 1:44 pm

It's probably because there is no value set for the variable you don't choose to increase. In other terms, just take out the 'is not equal' condition out of the branches and it should work.
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Condition problem

Postby Crusher » Sun Oct 23, 2011 2:54 pm

By the way: I don't see any reason to use 2 variables.

I always create it before the decision (set 0 to name)
and add 1 to it in case 1 and do nothing in case 2. Afterwards you can just ask whether this variable is 1 or not. No need for a second one.
User avatar
Crusher
 
Posts: 32
Joined: Tue Sep 27, 2011 10:35 pm
Location: Germany

Re: Condition problem

Postby Minikomicweb » Sun Oct 23, 2011 4:28 pm

User avatar
Minikomicweb
 
Posts: 25
Joined: Sat Oct 22, 2011 9:04 pm
Location: Spain


Return to Support & Development

Who is online

Users browsing this forum: No registered users and 6 guests

cron