tarek2's Forum Posts

  • It only display "D", the last cell of the column 1.

    So I can say that it's supposed to work, bu it doesn't.

    What are you trying to do? why didn't work? what are you expecting to happen on your last example?

    According to your last events it works as intended.

    You loop through the whole Array (Columns & Raws) but you just printing on the text:

    Column = 1

    Current Y

    So the last Y on (Column1 = D)

    You just printed the Raws in Column1 ober and over.

    You can loop through just one column without looping through the whole Array.

  • Looks like you have always 1 column where you store the value to check and right after on the second column the UIDs:

    0-1

    2-3

    4-5

    6-7

    If you are sure that the columns that store the UIDs they never gonna much with the variable that you are checking on your first columns as it will mess up things with wrong flags, because you are looping through all the columns, then you can do:

    You didn't say if you need to loop through all the Raws swell?

    Assuming that you need to check the whole Array (Columns & Raws)

    + Array: For each XY element

    Array: Value at Array.At(Array.curX,Array.CurY) = MyVariable

    -> Text: Set text to Array.At(Array.curX+1,Array.CurY)

    But if you think that the UIDs can match the Variable that you are checking then is better to loop just through the columns you need:

    0,2,4,6

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is an example using the most common characters, I removed all the special keys that are not needed.

    https://www.dropbox.com/s/36uvntld43dr9t6/ASCII%20Characters.c3p?dl=0

  • You could make all the decks in one single object and separate the decks by animation Name:

    Example:

    Animation = Deck1 = 40 frames

    Animation = Deck2 = 40 frames

    etc...

    You would link the Card number matching the Frame number

    Then you could do:

    On Card clicked:

    ---- Frame < Animation.Framecount - 1 ----------Action: Set card frame to self.Frame +1

    --- Else: Change to the next deck

  • If I understood correctly your issue is that when player1 is defending while pressing "X" you dont want him to get damaged?

    By a quick look at your events, it looks like you are doing the opposite:

    On P2 hit P1:

    -wait 0.1

    -Subtract 20

    -And if the player1 is playing Defend: Substract another 5

    That's a total of 25 you subtract when the player is playing defend

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

    So if you dont want to subtract while P1 is defending then the events should look something like this:

    On P2 hit P1:

    -wait 0.1

    -If P1 is not Playing Defend: Subtract your Value + Flash

  • I made the buttons invisible, but that made them also not clickable

    Sorry that was for if you're using normal sprites as buttons they will be interactive, I made a mistake and swapped them over)) I just corrected it.

    Glad you found a solution

  • Anyone have any other ideas?

    I made some changes to your project for the camera, see if you are happy with it:

    For me looks smooth with no stutters.

    All the changes made were in the Camera Group:

    -I removed the Pin from the crosshair

    -Bullet from the camera

    And I just lerp everything

    Also, I changed some settings in the Display settings

    https://www.dropbox.com/s/j280quoifanaprw/camera%20help%20V2.c3p?dl=0

  • Form objects always draw on top of the canvas, which is a bit annoying to work with.

    Though you can do any of these options:

    1-Set them invisible

    2-Change their positions to OffScreen

    3-Make your own buttons with sprites to avoid all those problems and have full control of opacity, Z-order, etc... (This is the option that I normally use) Note: (They will be still interactive though if you click on them so best make a boolean "Active" = OFF)

    4-Use CSS to customize the form objects

  • Just quick clarification to not cause any confusion to you guys:))

    The two questions were unrelated questions to me so I treat them separately:

    For the first:

    My scenario is, when player shoot, by hearing that sound some enemies will find the path to the player's area, they will search there. Like the android game Hunter Assasin. But my issue is when they move along path enemy instances are overlapping each other. Not sure how to solve this.

    I recommended using the Rojoh example I posted above which uses Physics

    For the Second:

    I've an another thought in my mind but not sure whether it will work or not. Pathfinding can be use for just to find the path but movement is doing via other behaviour by using the found path. Is that possible?

    It is just a general question about if you can use the official pathfinder with other behaviours, so I said yes storing the nodes and using them as waypoints.

  • I don’t think I’ve made a complete example of that.

    Using the physics behavior with the path finding behavior kind of solves that. But it can be janky because the two behaviors fight with how the objects move. It’s slightly improved by setting the physics velocities to 0 every frame, but the behaviors are still at odds.

    What I meant is to use the whole system you created, Pathfinder including:

    Here is one of the examples I'm referring to, it comes already with the pathfinding

    https://www.dropbox.com/s/79rd7hoyig86hmv/R0J0hound_pathfind_test_physics.capx?dl=0

  • My scenario is, when player shoot, by hearing that sound some enemies will find the path to the player's area, they will search there. Like the android game Hunter Assasin. But my issue is when they move along path enemy instances are overlapping each other. Not sure how to solve this.

    Have you checked the Physics example from R0J0hound that I mentioned in my last post?

    Because I checked the "Hunter Assasin" and that is exactly what you looking for, as if you press attention to the enemies in that game to avoid overlap they slightly push each other and that is what Rojoh does in their examples.

    I've an another thought in my mind but not sure whether it will work or not. Pathfinding can be use for just to find the path but movement is doing via other behaviour by using the found path. Is that possible?

    Yes, you can definitely use it with any Behaviour, you just have to save in a variable the waypoints generated from the Pathfinder then every time you reach a waypoint you will target the next one by (Waipointindex+1). My preferred behaviour for most types of movement is "MoveTo" You even have the Pathfinder integrated with it.

    Though if you didn't fix the overlap issue with the Pathfinder not sure how using other behaviours will help you.

  • Thanks brother for your reply. I tried the one you shared but still there is some of them is overlapping. Is there a way to get a result like objects not overlapping solid

    To avoid overlaps with each other completely is not an easy task. This is an incredibly difficult problem as it quickly becomes highly CPU intensive and chaotic if you dont know how to manage everything that's going on, and is easy to end up with objects getting permanently stuck, for example, pushing each other and not finding a way out, or some pushing others against a wall which they cant end up permanently stuck on that wall. I have tried in the past just a mini test for fun and I quickly recognised how much work and how many edge cases you have to count for.

    This is gonna be case per case, depending on how complex is your project you will try one way or the other and keep adjusting and identifying edge cases.

    The simplest way to start is by using Timers:

    For each Object: call Timer ---------Set Time = (0.5 * loopindex) or something like that and on timer find a path.

    The push-out of solids:

    Can be a bit junky sometimes when they push out each other as they can fly from one place to the other so you can try and see.

    There is not one solution to fit all, it all depends on the project and how perfect you want it to be.

    The smoothes I have seen today that the objects dont (fly or get stuck often) is by using Physics which was done by "R0J0hound", so if you dont mind using physics for everything like (Solids & Movement) then you can give it a try.

    I can't remember the link but do a quick search on his name you will be able to find it.

  • Hi travellers,

    I worked on the weather which will be included in the next update, I'm quite proud of the result :)

    • Procedurally created clouds.

    • Changing the weather in real time.

    • Variations of the rain according to the rate of humidity, speed, density of the clouds.

    • Appearance of thunderstorms and lightning depending on certain climatic conditions.

    A few more settings to optimize everything ;)

    Subscribe to Construct videos now

    Very beautiful Train))

    It catches my attention that 81% CPU as I dont see anything in there that will cause that high CPU value so you may wanna check if you have something that is hitting that performance.

    Good luck and keep it up!

  • > Is the same as an "Every Tick" event.

    >

    >

    > I like to leave them empty so I can identify them quickly while looking through my events.

    Ok, it's because I wonder if empty doesn't tire the system more being a faster reading than every tick,

    Is the exact same thing no worries you can use either of them.

  • Have you seen the new "Path Groups" in the Path Finder?

    Link: https://editor.construct.net/#open=pathfinding-groups

    Example:

    Without "Path Groups":

    Here is how it will look normaly when a group of objects tries to find a path, they will all overlap.

    And with the new "Path Groups"

    They will try to find an alternative paths so they dont overlap much