FilipWozniak's Forum Posts

  • Works fine, thanks!

    Objects do not overlap on itself, that's great!

    But I'm still trying to create a system that will draw me colors without repetition (for each iteration).

    Unfortunately it does not work.. I do not know why. Everything seems to be okay..

  • I did not want to make a mess on the forum I moved my topic on. I will be very happy If someone would be able to solve the problem.

  • Awww.. and now it works!

    However, my game has more bugs.

    I want to draw 3 random elements (without repetition of colors). Construct 2 actually draws me 3 elements, but sometimes imposes them on itself. That's no good. I honestly did not know how to solve this problem.

    It seems to me I have to read the position of object (when it is created), save it in a variable and in the next iteration check that has not previously been used, right? That's is the only thing that comes to my mind.

    My system of comparing frames is not perfect too, because the application always add 1 to the global variable " points" - no matter what object I choose.

    I clean up some code to be more readable.

  • It works! Wow, thank you very much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi!

    I was looking for the answer.. everywhere, but no one can solve my problem in the right way.

    I'm making a very simple game and I need to generate a few objects (random frames) in one time ("for" loop? I think so!) on several other objects. They have to appear once on one object, once in the another.

    Unfortunately, now they begin to generate always in the same place..

    What I'm doing wrong?

    Why "set position to another object" does not work?

    That's might be helpful ()

    Does anyone have an idea how can I solve my problem? What am I doing wrong?

    Thank you in advance!

  • Hi Construct maniacs!

    I was looking for the answer on the forum, but none of read article does not solve my problem in 100%.

    I'm making a very simple game and I need to compare two frames (but located in a different objects).

    I thought - no problem! And I do not know why.. That's terrible! Does anyone have an idea how can I solve my problem? What am I doing wrong?

    Thank you in advance!

  • Thanks for useful tips!

  • I solved this problem for my own. If someone was curious or just needed a solution:

    Just use 2 expressions: car_to_choose_2 | Set animation frame to random (0,3) & car_to_choose_2 - On created | car_to_choose_2 - Stop animation

  • Hi Construct 2 lovers!

    I'm creating a simple car game and I have a little problem with car spawners.

    So it's looks like this:

    I want that every car has a random color (that's a 1 object who has 4 frames [0-3]).

    I've already tried add expression car_to_choose_2 | Set animation frame to random (0,3).

    The only problem is that the C2 changes color every car every few seconds when it's creating a new object..

    Maybe someone has an idea how can I write this shorter without using four car spawners, but using just one. Unfortunately, the car must go in 4 different global sites and it is the biggest obstacle.

    Thank you in advance for help!

  • Asmodean Thanks! That's very helpful!

  • Hi everyone!

    I'm creating a simple car game. I created a variable that every fraction of a second shows the current speed of the main car.

    The problem is, when the car reverses. Values ??are minus, and I want them to be positive.

    How Can I do that?

  • blackhornet It's working! Thanks, you made my day bro!

  • Hi guys!

    I'm creating a simple Parking Game. I have 3 main layouts. Here is a small problem..

    I created the mechanics of choosing a car (frames idea). Selected car appears on current layout when I code like this: "Go to Level_1" and then select "Create Object". What I want from C2?

    All I want is the selected frame on a different layout! (Level 1)

    How can I change that? Please, help!

    This is probably a simple, but I can't see anything .

    Thank you in advance!

    To better illustrate the problem I put the image.

  • Okay This is helpful tip, but I still don't know what I should do, if I want to Construct 2 return to me a "vagrant8" value.

    Could you correct my .capx file?

    Please!

  • [quote:1wsktpui]easy way would be to set one textobject to ajax.lastdata on ajax completed..

    I've done that before.. like.. you know.. 100 times, and AJAX receives the correct values.

    The problem must be somewhere when C2 reading .JSON data using the plugin Here is my .capx file.. .

    https /view?usp=sharing

    Could you see what I'm doing wrong?