Woopop's Forum Posts

  • Hello there!

    I have a question if it is possible. I have created a multiple choice game where the last ; is the correct answer. It is based on reading data from text file into array

    My question is: Is there a way that when someone chooses one of the answers, a different text appears based on what they chose, without creating a different array for the answers? I have made it choose your own adventure with different txt files as game paths so it would confuse me a lot.

    Like for example: Choosing answer 3- Handshake;You give a firm handshake# ... So when the player chooses that, it will write as answer on the same text box: You give a firm handshake.

    Is there a way to code it this way with symbols from within the text somehow? Like the ; which symbolizes the end of the sentence. So if you put for example a symbol like #, from ; to # it would be the "You give a firm handshake." answer.

    Thank you for reading!

  • You do not have permission to view this post

  • I did: textbox-set css style outline-black

    and it worked exactly as I wanted it to. Thank you for everything! :)

  • Oh I see, this is much easier, thanks!

    I managed to style it my own way but the only thing that bothers me is that when I click on the textbox, the blue outline appears on the border making it look bad. Is there a way for the blue outline to become invisible, or at least black?

  • I saw a tutorial on how to add custom style on a TextBox in construct 2. the guy there took a name that the CSS had and put it as the ID, so that the TextBox looked and worked graphically like the CSS. But this one is more complex so I don't know exactly which ID it is.

    Here is the tutorial: youtube.com/watch v=-pdvGaglxFM

    (I added a SPACE on v= because it wasn't accepting the link.)

    I don't want it for a button though, but a textbox. The same principal should work though, right? just find the correct name from the CSS and add it to the ID area of the TextBox. This CSS is basically just an area to write, but looks really cool and i customized it in a program online.

  • I have this file and I want to know what to add on my TextBox ID. I watched a tutorial about it but this one is different so I am not sure. I tried a few things and it didn't work. Here is the code:

    body {

    background-color: #000000;

    font-family: "Arial", sans-serif;

    font-size: 40px;

    color: #00FF00;

    }

    #hiddenInput {

    font-size: 40px;

    font-family: "Arial", sans-serif;

    background-color: #808080;

    position: absolute;

    opacity: 0.4;

    margin-top: -22px;

    margin-left: -125px;

    opacity: 0;

    filter: alpha(opacity = 0);

    }

    #container {

    position: absolute;

    top: 80px;

    left: 50%;

    }

    #input {

    position: absolute;

    margin-top: -20px;

    margin-left: -120px;

    }

    .letterContainer {

    display: inline;

    white-space: nowrap;

    }

    .letterStatic {

    display: inline;

    }

    .letterAnimTop {

    display: inline;

    position: absolute;

    -webkit-animation: dropTop 0.1s ease;

    -moz-animation: dropTop 0.1s ease;

    }

    .letterAnimBottom {

    display: inline;

    position: absolute;

    -webkit-animation: dropBottom 0.1s ease;

    -moz-animation: dropBottom 0.1s ease;

    }

    .blink {

    position: static;

    top: -5px;

    -webkit-animation: blink 0.3s ease 0 infinite alternate;

    -moz-animation: blink 0.3s ease 0 infinite alternate;

    }

    blink {

    from {

    opacity: 0;

    }

    to {

    opactiy: 1;

    }

    }

    blink {

    from {

    opacity: 0;

    }

    to {

    opactiy: 1;

    }

    }

    dropTop {

    from {

    -moz-transform: translateX(0) translateY(-20px) translateZ(20px)

    rotateX(90deg);

    transform: translateX(0) translateY(-20px) translateZ(20px) rotateX(90deg);

    }

    to {

    -moz-transform: translateX(0) translateY(0) translateZ(0) rotateX(0deg);

    transform: translateX(0) translateY(0) translateZ(0) rotateX(0deg);

    }

    }

    dropBottom {

    from {

    -moz-transform: translateY(20px) translateZ(20px) rotateX(-90deg);

    transform: translateY(20px) translateZ(20px) rotateX(-90deg);

    }

    to {

    -moz-transform: rotateX(0deg);

    transform: rotateX(0deg);

    }

    }

    dropTop {

    from {

    -webkit-transform: translateX(0) translateY(-20px) translateZ(20px)

    rotateX(90deg);

    }

    to {

    -webkit-transform: translateX(0) translateY(0) translateZ(0) rotateX(0deg);

    }

    }

    dropBottom {

    from {

    -webkit-transform: translateY(20px) translateZ(20px) rotateX(-90deg);

    }

    to {

    -webkit-transform: rotateX(0deg);

    }

  • You do not have permission to view this post

  • I understand better now. Thank you for everything I will attempt to work towards it and reach my goal!

  • Oh I just noticed that it had 5 answers and the last was the correct. Too many new things to learn haha

    The second part about the answers confuses me a bit unfortunately since I do want different thing for each one. Could you give me an example of how it would be with the following question (and where to add the custom text answer for each one), so that I can understand better please?

    What weapon will you use?;

    Pillow; -2 health

    Knife; +1 strength

    Sand; +1 intelligence

    Feather; -3 health

    Knife;

  • I am sorry, I will be more specific.

    I found this tutorial here and it seems good for that type of game. Basically 4 answers and depending what you answer, you get a certain result, stats change and the story continues.

    construct.net/en/tutorials/trivia-game-929/page-2

    I could just go on the txt and add my own things. My questions are:

    1-In this tutorial I don't understand how it chooses the correct answer.

    2-How do I add conditions so based on the answer, instead of correct or incorrect it has: bad move -2 on health (lowers health number by 2), or: good thinking +1 intelligence, etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everyone!

    Logically speaking, I could make a few buttons, and depending what the player clicks it would do different things. But I would like something more fun than that, and maybe player stats to that, that can go up or down based on the decisions.

    Does anyone know a tutorial to create a game like that, or even better a capx example? Most of the games that I have created are platformers or shooters so it would be interesting to get more imaginative with a fun story!

    I would appreciate some help, thank you for reading!

  • As I was sleeping the idea to fix it came to my mind based on the things that you mentioned and I woke up and fixed it haha thank you!

  • What I want is when the game starts, the logo screen to stay there for 6 seconds and then automatically to start playing the game.

    What happens currently is that when I start from the logo screen layout, it just automatically goes to the first layout. Am I doing something wrong?

  • It worked, thank you so much!

    I tried turning global to YES before, but I didn't know how to activate it, so since I didn't want to break things even further I just turned it back to NO.

    Can't wait to work on this now as my new game!

  • Hmm..

    Then what could possibly be the problem that non of the arrays are working, since the only thing that I did was duplicate the layout?