luckyrawatlucky's Forum Posts

  • I have a player and I am rotate it towards mouse position. I want to snap the player's angle at certain angles 0, 90, 180 & 270 degree. If player's angle is between 85 and 95 then snap player's angle to 90 degree and same to other angles. I tried this same condition but never worked.

    Please help me how can I do this?

    Tagged:

  • lucid a new bug is detected

    A Spriter animation with loop disabled imported to C3.

    If animation is re played then everything disappears.

    Steps to reproduce:

    1. make any animation in Spriter

    2. disable loop for that animation

    3. Import animation in C3

    4. On start of the layout : add below three actions

    -> Set animation to "animation-name-here" and play from start with a 0ms blend

    -> wait 3 seconds

    -> Set animation to "animation-name-here" and play from start with a 0ms blend

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I didn't used this library and continued making chess myself from scratch.

    Reason I am not using library.

    1. I don't know how to call those library values into sprite positions.

    2. I want to make chess myself.

    as basic moves are created Now I am working on special moves.

    "castling" move is done

    "in passing" is done

    "kings" restricted moves also done.

    Now working on "restrict other players" if their move can kill king.

  • BTW I created chessboard in construct and then I created movements for each player.

    there were few things which I didn't made yet, restricted moves for king, castling and en passent square.

  • You have used javascript programming in the sample and I don't have javascript knowledge nor other programming language. So instead of doing

    runtime.globalVars.textBoard = chess.ascii();

    how can I save chess.ascii() in textBoard directly?

  • I don't know how to call things from file. can just give me any example on how to call things? and do I have to download chess.js and import in construct ?

  • I have read lots of tutorials on how to make chess but those tutorials are on other programming language like javascript etc. I tried to follow those tutorial but I don't know how to implement that in construct.

    please anybody can guide me on how to start?

    If 8x8 array I feed players name like

    bR bN bB bQ bK bB bN bR

    bP bP bP bP bP bP bP bP

    0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0

    wP wP wP wP wP wP wP wP

    wR wN wB wQ wK wB wN wR

    then how can I move sprite position according to their names in the Array

  • It was my mistake, I was using ..(..(...) % 10) × 10) % 50 = 0 instead of ..(..(...) / 10) × 10) % 50 = 0

    I was doing remainder on both side

    Thanks

  • No This is not what I want. What I want is Every 50 pixel distance I want to trigger.

    i.e 50,100,150,200,250 ... and so on.

  • hello InDWrekt thanks for your answer.

    this is triggering after 3-5 pixels. How do I setup it for my custom pixel (for example 50px distance).

    and I'm also not sure how its working. for example If distance is 300px then how these events working

    can you explain how this event working?

  • I am calculating distance from touch start to current position of touch. then I want to trigger when distance is crossed every 50 pixel. i.e. when distance reached 50px then trigger it, when 100 pixel crossed then trigger it.

    I want to do something where its triggered. How can I achieve this?

  • I have 10 instance of sprite "dot" in the layout now I want to position them equally between 2 positions.

  • in above example only 2 dots but in actual game there are more than 2. sometime 5 and sometime it could be 10 etc.

    See image. when a line is overlapping with dots then I want to get their uid in each other dot's instance variable. for example If line is overlapping with dot1 and dot2 then I want to get dots2 uid in dot1's variable and dot1's uid in dot2's variable.

    for that reason I stored all overlapping line's uid in dot's variable so by matching that uid number in variable I could get both dot's uid in each other.

    Do you have any short way?

    btw I'm trying to make this game

  • I have 2 instances of sprite "dot" in the layout. "dot" has a string variable "num".

    first instance's variable value is "1,2,4,7" and second instance's variable value is "3,7,8,9".

    Now in the event sheet How can I find matching number of both instance. Like in above two values 7 is matching.

    I know it can be done using tokenat expression but how to compare two instance of same image.

  • Thanks it worked