User Tag List

Results 1 to 9 of 9

Thread: How to display paragraph?

  1. #1
    No Products Registered

    Join Date
    Feb 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to display paragraph?

    Hi, all...
    I have this problem :

    I have a string object named "Game Text" and it has 20 paragraphs.
    I have an active object with an alterable value named "answer".

    What I want to do is this :
    When the player hits the "A" Button, the "Game Text" is displayed according to the number stored in the alterable value "answer".

    So, for example...

    +Button "A" is pressed
    +Answer = 1
    Then... display paragraph 1 of Game Text

    +Button "A" is pressed
    +Answer = 2
    Then... display paragraph 2 of Game Text

    +Button "A" is pressed
    +Answer = 14
    Then... display paragraph 14 of Game Text

    etc....

    I tought that was pretty easy if I use the "use a calculation" function of the string object.

    I tried with :
    +Button "A" is pressed
    +Answer > 0
    Then... display paragraph (Answer)

    The problem is that it does not matter which formula I put in there... the text will always display the first paragraph of the string!


    Somebody can help?
    Thank you in advance!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Iceland
    Posts
    478
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: How to display paragraph?

    Hi

    Is this what you are thinking of

    http://www.engjaskoli.is/images/stories/lyfta/para.mfa

    Keli

  3. #3
    No Products Registered

    Join Date
    Feb 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to display paragraph?

    Thank you for the answer,

    No, because you didn't used the "use a calculation" function.
    You used 3 line of codes to display the paragraph.
    If Value is 1, then display paragraph 1
    If Value is 2, then display paragraph 2
    If Value is 3, then display paragraph 3

    What I need to do is exactly what you did in your example but using only 1 line of code
    If Value is X, then display paragraph X

    To do this I must use the "use a calculation" function that you can select when you're asked which paragraph to display.
    The problem is that regardless of what you put in, it will always display paragraph 1.

    Ani ideas?

  4. #4
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: How to display paragraph?

    Somewhere in your code you must increment your alterable value. I suggest the following: (pseudo code)
    Code:
    •Button "A" is pressed
       Add 1 to Answer
       Display paragraph (Answer)

  5. #5
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to display paragraph?

    Easy!

    here you go:

    http://www.mediafire.com/?nd40xvlzjlk


  6. #6
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to display paragraph?

    Sorry my last one was crap:

    here you go

    25 buttons, two lines of code

    http://www.mediafire.com/?mzhod3gumnn

  7. #7
    No Products Registered

    Join Date
    Feb 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to display paragraph?

    Thank you guys for the answer.
    We're getting near to the problem.

    Both Olivier and MaVado found a solution but unfortunately that does not solve my problem because you didn't displayed the text using "display text" but using "display paragraph".
    Mavado, in your example you used the "Set Paragraph" function and not the "Display Text" function.
    The set paragraph function is working for me too but I need to use the display text function.

    So why if you "display text" using the formula you used for the "set paragraph", you will always see paragraph 1, regardless of the alterable value A of your active?

    Maybe I'm doing something wrong?
    Hope someone knows the answer T_T

    Thank you in advance!


  8. #8
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to display paragraph?

    Hmm, I just checked, this a bug!

    As a workaround I suggest using the last example I posted and change the X/Y postion to you needs.

  9. #9
    No Products Registered

    Join Date
    Feb 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to display paragraph?

    Awwww!
    Thank you Mavado.
    I will surely use the example you posted

Similar Threads

  1. Ending a frame at the end of a paragraph
    By Heclegar in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th January 2011, 09:38 PM
  2. Paragraph in string
    By pnekdo in forum SWF/Flash Export Module Version 2.0
    Replies: 4
    Last Post: 21st March 2010, 09:54 AM
  3. Replies: 1
    Last Post: 10th February 2010, 05:35 AM
  4. Counting the letters in a paragraph
    By ruffgang in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th February 2008, 04:23 PM
  5. paragraph_error_stopped at 2 paragraph!
    By 4444 in forum File Archive
    Replies: 3
    Last Post: 1st November 2006, 08:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •