How to do this ?

0 favourites
  • 8 posts
  • I have 4 players and each player will choose color for him.

    If first player choose "red" then i want to show remaining colors to other player, if third player choose blue and i want to remove blues from other 3 players same with all. and if any player again deselect color then other player will get that color option again. (See image below). I want to do this without using Array.

    anyone can explain me logic on how can i do this?

    Thanks in Advance.

  • It's easier to make a demo, than explain..

    dropbox.com/s/3nrvoqrw1rj4651/PlayerColors.c3p

  • its my mistake in typo

    i want it without array and i typed with array. and i want to bring color options back if player dis-select color and choose another. and in your example indexed player choosing colors.

  • You can do it without an array, just save the color (animation frame) in a variable. If you want to allow de-select, then simply don't destroy the circles until player confirms the chosen color. Or add an option to reset and start over.

  • okay i'll try it

    Thanks

  • above is done successfully

    Now i was trying to do something else and got stuck at that

    in this image these colors has 2 variables "player" & "color"

    there is a preview icon which represents picked color

    we have total 4 colors if i choose color red for player 1 then player 1's preview icon (which is yellow currently) will be replace with red icon and the red icon (which is situated after player 3) will be replaced with yellow. in short swiping the color.

    i getting problem here 1st and 2nd icons are swapped but 3rd icon is not swapping. I am not getting what wring i am doing here.

    these are my events for swapping.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • preview icon has 2 variable "player" & "color" and same variables for color icons

    when click on color icons

    then i pick preview icon by color.player and set preview icon's color variable to color.color

    then i also pick preview icon by color.color and set preview icon's color variable to color.player

    what's wrong in this logic?

  • problem solved

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)