mikeadamski26's Forum Posts

  • I'm quite new to Construct 3 still, so I'm just dabbling on some little projects to learn.

    I have a dictionary with two instance variables: Excellent and Awful. They both are just a sentence of text.

    I am randomly generating an integer between 50-100. I have a text box that I would like to populate with my Excellent instance variable text if the random integer is 80-100 and would like to populate the text box with my Awful instance variable text if the random integer is 50-79.

    Thanks for the help!

  • Here is a bit more detail of what I'm struggling with on these else statements:

    This image should change the down and distance from 1 and 10 to either 2nd and X (X being anything that is less than 10, in this case) or ELSE if the NetGain is greater than distance, it should reset down and distance back to 1 and 10.

    It should also reset to 1st and 10 (and switch directions aka which team has the ball) if down is greater than 4.

    Also, it will reset the ball to the 30 yard line if either team "scores," that is reaches one of these x positions that represent the position of my goalline.

    Above this the NetGain is being generated randomly.

  • Thank you. Those scoreboard texts are actually more than one item, but it does look confusing in the image because they are named things like "ScoreboardDown" and ScoreboardToGo", etc.

    I'm a bit deeper into this now, and have a duplicate thread (didn't realize posts needed to be approved) that I'll move the discussion to:

    construct.net/en/forum/construct-3/how-do-i-8/trouble-learning-event-sheet-175175

  • Hey, sorry I don't seem to have notifications turned on for replies. Thank you for assisting me!

    I am exploring around a bit now with using else conditions, and while I understand the concept (and use them in other applications), mine always seem to be red/unreadable.

    I have read the tutorials a few times now, but the hierarchy of events is very confusing to me still.

    To use a simple example, how would I use an else condition for:

    If NetGain(v) is greater than or equal to ToGo(v), set ScoreboardDown(text) to 1 and ScoreboardToGo(text) to 10.

    //This basically just generates a new set of "1st and 10" for the team as they gained more than the yardage needed for a 1st down.//

    Else

    Subtract NetGain(v) from ToGo(v), set ScoreboardToGo(text) to ToGo(v).

    Add +1 to Down(v), set ScoreboardDown(text) to Down(v).

    If Down(v) is greater than 4, set ScoreboardDown(text) to 1 and ScoreboardToGo(text) to 10.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A bit of hyperbole there, as I don't think this is all that bad. Nonetheless, I cannot get this to work!

    Below is a simple test image. I'm simply trying to make a football move forward (or backwards) based on a random interval. That part is working fine.

    The issue I am having is that I want to have my scoreboard update the down and distance to go based on the NetGain variable. The scoreboard starts at 1st and 10, and here is what I'm trying to get to work:

    1) If the random NetGain number is greater than ToGo, then it's a first down! Therefore, I want the scoreboard to indicate 1 for Down and 10 for ToGo.

    2) If the random NetGain is less than ToGo, we simply add +1 to down (max of 4) and then subtract the NetGain from ToGo to show the remaining yardage left for a first down.

    This is something obvious I'm messing up with the ordering of things and an understanding of the Event situations hierarchy. I've read the manual on this section multiple times, but it doesn't seem to align with what I am doing, exactly.

    Thank you for the help!

  • This will be very easy for you, I'm sure, but I'm having trouble with the following:

    What I'm trying to do is:

    1) Move a football icon across the field based on the NetGain variable (that's working fine in this random test setup)

    2) Update to show 1 for Down (textbox) and 10 for ToGo (textbox) if the random NetGain from the mouse click was greater than or equal to the ToGo variable (defaulted to 10).

    3) Similar to #2, but if the NetGain was less than ToGo, it would then add +1 to Down (variable) and subtract the NetGain from ToGo (variable).

    I'm guessing I just have a hierarchy issue or things tabbed in the wrong places.

    Thank you!