Banatawa's Forum Posts

  • Banatawa

    Use random(151) - this will return a number from 0 to 150.99999999999

    So you if you want to round it to the nearest integer:

    round(random(151))

    And if I want to pick a number between, for exemple, 10 and 40?

  • With the "set webfont" action of the text plugin, there is a load time. With this behavior is it also present?

  • Thank you !

  • Good morning!

    I apologize in advance for my bad English.

    I am developing a game downloadable on Gamejolt. At the same time, I would like that C2 can unlock trophies via Gamejolt, and also that he can log in by being connected to their account.

    I would like to do it in the simplest way possible.

    Thank you in advance.

  • I would like to assign a value between 0 and 151 ...

  • up

  • up

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You only need the .capx

    Just open it in C2.

    Oh, I have to update construct 2

    Tank you

  • It's not complicated, here:

    https://www.dropbox.com/s/52pnctfjocwbq ... .capx?dl=0

    Thank you but...

    You did not save it in one file.

    I only have the .capx

  • Hey,

    I am creating a fangame of an RPG and as in all RPGs, there are dialogues.

    I reassure you, I can do dialogues.

    By cons I have a problem ...

    As you can see in the image, a text appears when some dialogues are present. This text is simply an "*" that introduces each new sentence at the beginning of the line.

    The thing is, there is not a single dialogue, so I would like to set this text to invisble.

    If the text has two sentences and two lines, I would like "t_dialogue_étoile3" to be visible.

    Example:

    Dialogue 1:

    * Howdy!

    * I'm Floowey.

    * Floowey the floor.

    Dialogue 2.

    * I really like potatoes because ...

       and that's all !

    * Do you agree with me?

    Dialogue 3.

    * I like eating earth.

    * I like to dance dancing dancing ...

       dancing dancing dancing.

  • This may be easier to understand:

    myText="Hello, %John%! How are you?"     <-  use % to mark start and end of yellow text.
    
    letter=""
    
    textYellow=0    <-  textYellow=0 means black text, textYellow=1 means yellow text
    
    For i=0 to len(myText)-1
      Wait 0.5*loopindex seconds
      letter=mid(myText, loopindex, 1)
      If letter="%"     
                If textYellow=0  Set textYellow=1    <- next letters will be yellow
                Else Set textYellow=0                   <- next letters will be black
      Else
           If textYellow=0  bbt_dialogue_texte Append letter
           If textYellow=1  bbt_dialogue_texte Append ""&letter&"[/color]"[/code:3l3t2kxn]
    

    Even that seems to me too complicated ...

    I think I'll keep it that way eventually.

    As I said before, it fits well with the story of my game.

    Sorry to have bothered you and thank you for your help.

    The plugin will still be useful for texts in menus and others.

  • At worst, it does not matter. The universe of my game is already bugged in history. So having an effect of this style may not be so bad.

  • I'm not sure I understand you.

    When you need to display next letter of the dialog and that letter should be yellow, add this:

    ""&letter&"[/color]"[/code:2uor5bmf]
    
    Your code could be something like this:
    
    [code:2uor5bmf]
    myText="Hello, %John%! How are you?"     <-   Put symbol % before and after the text you want to display in yellow
    textYellow=0  
    letter=""
    
    For i=0 to len(myText)-1
      Wait 0.5*loopindex seconds
      letter=mid(myText, loopindex, 1)
      If letter="%" set textYellow=(textYellow=0)    <- this will invert textYellow variable, 0 becomes 1, 1 becomes 0
      Else 
         If textYellow=0  dialogText append letter
         If textYellow=1  dialogText append ""&letter&"[/color]"
    [/code:2uor5bmf]
    

    I ... I did not understand?

    Could you use more simple "comments"? I have a hard time with English.

  • To display my dialogues, I proceed more or less this way

    Every 0.05 seconds || bbt_dialogue_texte | Set text to left(bbt_dialogue_texte.instancevariable&FLOWEY&newline&...., len(bbt_dialogue_texte.Text) + 1)

    This means that the tags will still be displayed.

  • Try this:

    Add a special character to each letter in the string that you want to be yellow:

    myText="Hello, ^J^o^h^n! How are you?"

    Then parse this string character-by-character and when you find "^", read next letter and wrap it into {color} tag:

    H
    e 
    l
    l
    o
    ,
    
    J[/color]
    o[/color]
    h[/color]
    n[/color]
    etc.[/code:52zgqv8e]
    
    [quote:52zgqv8e]is there any way to change the plugin of my texts
    

    If you need to replace lots of text objects, you can edit XML files of the project, as described here, but it's not recommended.

    I do not need to try to know that I will have the same problem but worse seen all the tags that there is. The problem with this plugin is that the color is displayed when the text is displayed. However, the dialogs display the text letters by letters, without forgetting the tags. Once the opening tag is written, the following becomes yellow. The closing tag will also be displayed before it is fully written.