tarek2's Recent Forum Activity

  • Perhaps some more clarification is best.

    Yeah, great explanation from lionz, I dont think it needs more explanation than that:

    A few points that I think are important:

    but pushing back on the X axis with Armor.X adds a new entry, in my opinion is super weird.

    Is exactly the same thing you were doing:

    You were using "Insert" in the Y so what this does is insert a new Row.

    I use "Push" which is the exact same thing I push a new Row or column.

    The only difference between the two is that "Insert" lets you pick the (Y or X) index where you want to insert the Row or column. And push just insert the new (Row or column) at the back or the front.

    "Yeah it works and I sort of understand what's going on but it isn't very intuitive."

    Is quite intuitive and safer than the system you were using as By inserting always back you protect all the Rows and values that you already had in place for the old parts, especially since you say that ober time you gonna keep adding new parts, therefore you better no change any index reference. So if you you keep inserting in any index you will have the risk of breaking your code as you gonna have to constantly change the references that you already had in place to get the old part values.

    On the other hand, if new parts get inserted in the back then all the old parts are protected since you do not change their index reference ever.

  • I dont think QR Code supports sending the image in itself but I could be wrong.

    I haven't seen any QR code do that yet.

    Normally what they do is:

    1-Take the SnapShoot

    2-Upload the image to your server

    3-Copy the direct URL link of the image

    4-Use the QR Code generator to create a QR code using the URL

    Then when the players scan the Code with their phones they will give them the direct link to the image, where they can open it and save the image on their phones.

  • find(Text, "Word")

    It will give you the index number of where it found the first-word match

    or

    If didn't find any it will give you -1

  • each row is supposed to be its own instance, the rest of its information is on the Y axis.

    I think you meant each Column is supposed to be its own instance, this is if you want to save the rest of the instance info on the Y axis as you mention.

    At the moments:

    -You are inserting values only on the Y of the first raw as you are not defining the X.

    If you want to save each instance on its own column like (X0 Instance1, X1 Instance2,X2 Instance3, etc...)

    Here is a better approach:

    Before you start the loop to insert values you need to set the size of the Array once and do it outside the loop

    To a size(0,3,1)

    Then in the loop:

    For each Armor is overlapping:
    -----> Array Push Back Armor.X
    -----> Array Set at (Self.width-1, 1) Armor.Y
    -----> Array Set at (Self.width-1, 2) Armor.Zindex
    
  • Can you also tell me if it is possible in Contruct 2 to create a life bar for a family? Because it is not possible to add a container to a family with

    Containers dont work with families.

    You gonna have to create your own tracking system with UIDs or something similar to link the (Enemies Family + HealthBars)

    Here is a very basic example of how to create and link a health bar in C2:

    Basically just shows how to (Pin and link UIDs) using families.

    Is a long time since I dont create UIs in Construct2 and forgot how tedious the process was. Especially when you have been using C3 hierarchies for so long time, which takes care of all behind the scenes, it is as simple as building the HealhBar in the editor and just spawning it with the enemy creating a hierarchy. Also, the picking is simple, just pick Enemy childs. Few lines of code compared to all you have to do in C2 to get it working with UIDs etc...

    https://www.dropbox.com/scl/fi/gtj2nb73mcdwi6ov8lg6v/1-Health-Bar-That-Works-with-Family.capx?rlkey=fv045430xdv09n7s96qyntat9&dl=0

  • Unfortunately I'm creating it in Construct 2, can you do this in it? Thank you so much for helping, I've been having a headache with this for months.

    Is the same thing, they use the same events, nothing different.

    Just copy the events line by line in Construct 2, it should work.

  • Hi Amanda

    Will this help you?

    https://www.dropbox.com/scl/fi/d7xxwpil8ig6ft96dm687/1-Dont-Target-objects-from-the-same-Team.c3p?rlkey=z47eudlybobwvwzkxcv4rrg1n&dl=0

    The turret behaviour can be a bit tricky to set up.

  • Unfortunately, there is no expression for that.

    An idea maybe is to keep track manually by adding the tags into a dictionary keys and then you can just check "Dictionary.KeyCount"

    You will just need to remember when you stop an audio make sure you remove the key from the dictionary.

    or

    By making a loop to check all the audio tags one by one to see if it's playing, then add to variable 1 for each tag that you find playing.

  • If you really need it and dont mind using Construct 2 then it is possible by using a Plugin. I use it all the time but for personal projects that is not meant for release to the public. It is a great plugin and is a shame that it wasn't ported to C3.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are many issues in your events:

    1-The trigger "On any animation finishes" will never trigger as you stop it manually. That trigger is meant for when the animation reaches the end of the animation.

    2-Your Animation (Attack & Walk) are conflicting because both are constantly true when the enemy is at (less than 85px) distance from P1:

    Example:

    Line of sight = True ----> Set to walk

    The enemy's distance to the player is <85 -----> set to attack, as you never stop the line of sight

    The best way to control the states is by variables.

    Here is one possible solution:

    Add an instance variable to the Enemy and call it "State", and set its (type = String)

    Events:

    -Enemy has LOS to P1

    -Enemy distance to player > 85

    -->Action:

    MoveTo move to player

    Set Mirrored

    Set animation to walk

    Set state to "walk"

    ============================================================

    New event:

    State is = "Walk"

    Distance to player is (=< 85) less or equal 85

    --Action:

    Stop MoveTo

    Stop Animation

    Set State to "Attack"

    Wait 0.2 seconds

    Set Animation to "Attack"

  • So how can I find out if an array has only zeros?

    You need to loop through each cell and compare if the value equals zero.

    If it's a 1D Array use:

    If it's a 2D Array use:

    "For Y" from (0 to Array.Height-1)
     "For X" from (0 to Array.width-1)
     ----> Array.at("X","Y") = 0
     ----> Else = Stop the Loop
    

    I cannot get the format properly, here is picture, that looks better:

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies