InDWrekt's Recent Forum Activity

  • I knew there are some GCSE-level programming basics that I'm missing :D

    Some extra reading helped: bbc.co.uk/bitesize/guides/zs3qrwx/revision/1

    Thanks for the demo! I think I got it.

    Out of curiosity - how does the text attach itself to the targets? Both visually and logically - I see no pins or position definitions.

    You're right, there are no pins or position definitions. I am using a container.

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers

  • An array could work but it would be more clear/readable and thus easier to upkeep if you use instance variables. Here is a small example to get you started:

    drive.google.com/file/d/1eDWdZQR7hY_ocfak7CJT1ndQtzMCCoiw/view

    It will probably take a bit of studying to understand everything going on but it should answer all the questions you've asked.

  • You're welcome. Good luck with your project.

  • So, there was something bothering me about the original example and I couldn't help but mess with it some more. Download the project again. I simplified it. The original example drew the circle in 2 events. 1 split the circle into 8 parts and the other filled the 8 parts again splitting them into 8 parts. I got rid of the second draw event and instead just divided the circle into 100 even parts in the first event. It basically looks the same but reduces some memory use and CPU processing. Plus it's easier to read and upkeep.

    drive.google.com/file/d/12DTzuTArnmAPlzMk6DOdKBqUIbC5Gl92/view

  • Here is a small sample of that chase mechanic built in Construct. The enemy has line of sight and move to behaviors. Tap to move the green character. The red character will chase if it has line of sight. If the red character is within attack range (stored in a range variable on the red character) it will stop moving and start shooting. If the player moves out of range, the red player will go back to chasing. If the red character loses line of sight, it has the ability to try to get it back by moving to the last known location of the player. If it reaches the last known position and still doesn't have line of sight, it stops and waits.

    drive.google.com/file/d/166bydrsqn_XCW5L1q7Z1b_drnzxfeSq0/view

  • You're welcome. Good luck with your project.

  • I also want to say, as with most questions, there are multiple ways to do what you are trying. For example, if you want more control over the color, use individual variables for each of the red, green and blue inputs. Then when you call the set font color, just plug these values into the inputs of the expression.

  • drive.google.com/file/d/1tve8LYP4A-8zaGQ_TZrij61jZj2jmbDz/view

    Ok, you are trying to store the rgb expression itself in a variable. What you need to do is store the resultant value. Check out this example. It sets the value of an instance variable called Color on the text object using the rgbEx expression. It then uses that variable to set the font color. Remember, it is not the rgb expression that is important. It is the value that the expression returns. That value CAN be stored in a variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Of course there is. It's just a couple sin and cos functions. To get the circle to start at the top we need to rotate it by 180 degrees so we add 180 to the value inside the functions. To get it to fill clockwise instead of counter clockwise, we just need to invert (multiply by -1) the value inside the function.

    sin(-1 * (value + 180))

    cos(-1 * (value + 180))

    Here is the modified example.

    drive.google.com/file/d/12DTzuTArnmAPlzMk6DOdKBqUIbC5Gl92/view

  • Don't extract the the file. it should stay as a single file. When you download it, it should have a .c3p file extension. If it downloads as a .zip, just change the .zip to .c3p. In Construct, use the open local file option.

  • Have you used one of the rgb expressions? These expressions are built so you can just plug in values representing the amount of red, green and blue to blend to get your desired color.

    rgba(r, g, b, a)

    rgba255(r, g, b, a)

    rgbEx(r, g, b)

    rgbEx255(r, g, b)

    For these expressions, r is for the red value, b is for the blue value and g is the green. In the 2 expressions not ending in 255, the value should be between 0 and 100. In the 2 expressions ending in 255 the value should be between 0 and 255.

    The a is for alpha and should be a number between 0 and 100 where 0 is completely transparent and 100 is completely opaque.

  • You do not have permission to view this post

InDWrekt's avatar

InDWrekt

Member since 19 Sep, 2011

Twitter
InDWrekt has 7 followers

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies