tarek2's Forum Posts

  • You can use the Tween behaviour:

    1-Add an invisible object outside the layout

    2-Add to that object the Tween behaviour

    Then you can do:

    Object Tween Value Start(100) End(0) Tag"Fade"

    Then for the layer:

    Object Tween is Tween Tag"Fade" playing: ---------Set Layer Opacity to Object.Tween.Value("Fade")

  • tarek2

    Thanks! I was able to fix it by disabling Default Controls and using Simulate Movement for each key instead. There must be something about the Default controls that don't like custom keys being used in tandem with them.

    It should work even with the default controller:

    I did a quick test to check it out and it works for me, here is the demo:

    https://www.dropbox.com/s/z3zgy86erpzpwfx/Platform%20Test.c3p?dl=0

    It must be something else in your project or a bug.

    Though glad you found a fix.

  • Create invisibly doors in all the entrances and add an instance variable "Door_Number" then set each door with its own unique number: 1,2,3, etc...

    Supposing that the Cave is in a separate layout:

    You need to repeat the same process and create all the invisible doors with the same "Door_Number" unique number: 1,2,3, etc...That you set it up above.

    1-Then on colliding with any door to enter the cave save the "Door_Number" in a global variable, Array, Dictionary, or whatever method you like.

    2-On Cave Layout:

    -At the start of the layout:

    ----------Door.Door_Number = Global Var "Door_Number": ---------Action:Set Character Position to DoorX,Y

  • Your events look normal, it should work.

    You may have something else interfering with the Jump.

    If you cannot find the source of the problem then it may be a good idea to share a small demo just with those events so someone can look at it to help you find the issue.

  • I beileve that is lookking for "Unbounded Scrolling"

    If you set the Layout where the Camera is to "Unbounded Scrolling" then the camera will be always centred no matter how much you drag it.

    If I understood correctly.

  • Nice fredriksthlm

    Thanks for checking it out.

    I can confirm that indeed:

    -Works fine in r329.

    -But stopped working in r330 and later.

    I opened a bug report as per Ashley's request:

    Link:

    https://github.com/Scirra/Construct-bugs/issues/6961

  • Just another quick question: When I get my second value, let say that I also want to put a Z dimension in my array (like 2 depth). So I can select a random dimension between 0,1 and 2 with different values for my selected cell. But how can I make the loop stop?

    For now I did something like this but the value change at every tick:

    + System: For "Y" from 0 to Array.Height-1

    ----+ Array: Value at (0, LoopIndex("Y")) = Variable1

    -----> Text: Set text to Array.At(1,LoopIndex("Y"),Array.CurZ)

    -----> System: Stop loop

    So do I have to make another loop for the "Z"?

    System: For "Y" from 0 to Array.Height-1
    Array: Value at (0, LoopIndex("Y")) = Variable1
    -----> Text: Set text to Array.At(1,LoopIndex("Y"),random(Array.Depth))
    -----> System: Stop loop
    

    For now I did something like this but the value change at every tick:

    I mentioned that on my last comment:

    4-If you dont need to check the Array every tick make sure you put this code under a trigger or a function so you can call it only once, as how it is now is running every tick.

    I highly recommend you first read how the events work before you carry on or you will have many issues like that, which will make you spend hours debugging or changing Events unnecessarily.

    Read this part of the Manual as many times as you need until you understood everything properly.

    https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/events/how-events-work

    You will find important info to avoid issues like "Running events every tick".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set the Bullet "Angle of motion" in the direction that you want it to go.

    Normally if the bullet's default Angle is looking to the right then you set it to:

    Angle of motion = 0

    To move in the right direction

  • If you can post a small demo with only the code that has the issue they will be able to help you quicker, as it could be anything in the code or C3 bug etc... Will be hard to say if they dont see your project.

  • Np glad you sort it out)

  • I agree, that was a good idea to show your project as they were many issues, otherways we would have lasted a while with this back and forwards from what I see you was going on a different direction))

    I modified your Project:

    https://www.dropbox.com/s/qbjybup1y0lj7py/ArrayTest2.c3p?dl=0

    1-Use (Compare at XY) instead of (contains a value)

    2-For the Loop you need to put the Actual Array Height size, not the Value.

    3-In your Goblal variable "Variable1" you entered the wrong value:

    1|0|1

    Because there is one character missing at the end as in your Array you have:

    1|0|1|

    So it will never trigger the match, make sure you always put the exact value.

    4-If you dont need to check the Array every tick make sure you put this code under a trigger or a function so you can call it only once, as how it is now is running every tick.

  • It seems to still be working fine for me. It's difficult to help without more details about precisely what you're doing.

    I'm still having this issue:

    Video to show quick the issue:

    https://www.dropbox.com/s/u1txghbx5l1nmjy/Save%20BUG2.mp4?dl=0

    How to replicate:

    1-(Drag & Drop) any project stored on your PC into C3

    2-Make any changes

    3-Hit Save button

    Observed result:

    It opens the File Explorer to select where you want to save the file.

    Expected result:

    To save directly in the same file without asking again where you want to save it.

    It used to work fine before and it just recently started to ask where to save the file again. I cannot remember exactly when started as it's been 1 or 2 months at least I think.

    This is very dangerous because if you have multiple files in the same folder you can select the wrong file and override it by mistake, as it happened to me a few times because you select quick the file to save to without presting much attention.

    I'm currently using the last Version: R338

  • • First I have a variable for column 1, I need to check in my array at column 1 where is the matching value

    • When the value match, it stops the loop and picks the value on the second column (if my value is located in the cell x3, y0 I want it to pick the value in cell x3,y1)

    From your explanation, It seems that you have the (Columns & Raws) inverted, maybe that's why you have many issues.

    First Column is (X = 0) not (X =3)

    So if you find a match you will pick up the value from (X = 1)

    You can still use my last example:

    To Check the first column for example without stopping if there is a match:

    For "Y" from 0 to (Array.Height-1)

    ----Array: Value at Array.At(0,Loopindex(("Y")) = MyVariable

    --------> Set Text to: Self.Text & newline & Array.At(1,Loopindex(("Y"))

    You just have to add one more action after you set the text

    "Stop Loop"

    I though that this method with array is the easiest way to do what I want but maybe I'm wrong and there is something more simple?

    It's very simple once you learn how to do it and it's the correct way of doing it.

  • Are you waiting for Ajax to finish loading the JSON?

    It works fine for me.

    If you have a small demo of the Array that fails could be helpful to see if there are any errors.

    Also, press F12 on Chrome and see if there are any errors on the console log

  • My last example was just to check that there is no problem importing a value, sorry I'm just a beginner with the arrays.

    But my purpose, as you noticed earlier, is to match my variable with the value of the first column and then pick the value on the next column.

    No worries)

    The easiest way to resolve this so you can see how everything works is by you give a specific example, as your question is a bit too broad:

    Example:

    1-Are you trying to check all the columns and Raws?

    2-Or are you trying to check just one column?

    3-What happens when you find a matching one do you stop the loop? or do you continue checking the rest of the column?

    You see? according to what you need the answer will be different.

    Also, just a quick note, if you trying to print on the text multiple UIDs or vales then you need to use:

    set Text to -----------Self.Text & newline & NewValue

    To Check the first column for example without stopping if there is a match:

    For "Y" from 0 to (Array.Height-1)

    ----Array: Value at Array.At(0,Loopindex(("Y")) = MyVariable

    --------> Set Text to: Self.Text & newline & Array.At(1,Loopindex(("Y"))