board game positions

  • I have a Board Game with 40 different positions and every position have an object and just i want to move my player to one o those objects position depending what number the dice give to the player, like if player is in object 5 position and dice give a 6 then move player to object 11 position.

    i have 40 objects call spawn

    from spawn1 to spawn40

    P1position is a variable that has the player position plus dice number

    i try doing this but is no possible in construct2

    system created object Player1 on layer 3 at ("spawn"& P1position &".X") ,("spawn"& P1position &".Y")

    if there is other way to do it please help me, thank u..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The system>Create object only accept numbers as far as I know, while placing "" will turn it into a string.

    If you know where the player should go, pick this coordinate as number and setup the System>Create> to that position.

    For example, if you want the player go to slot 11, and you know the name of the object there, just setup:

    System>Create>ObjectPosition11.X,ObjectPosition11.Y

    Where ObjectPosition11 is the name of the object on position 11.

    To know what object you should pick before setup the creation system, pick it using, now, a string like this:

    Condition: System>Pick by Comparison>ObjectPosition & DiceResult+PlayerPosition

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