2 actors one space help

majjam13majjam13 Member Posts: 3
edited November -1 in Working with GS (Mac)
hi, i have this problem in my game and cant figure it out. I have two actors and one space. I cant figure out how to have a (actor A) move to a space and if (actor B) is there destroy (actorB). And if (actor A) is in the space, and (actor B) moves to the space destroy (actor B).

i.e. like checkers if a piece moves to a spot and captures a piece

Comments

  • specialist_3specialist_3 Member Posts: 121
    Is this real-time (2 actors moving in same time) or turn-based (Actor A moves first, then Actor B, then Actor A again and so on)?

    If turn-based, under rule, you have a condition which checks for Collision/Overlapping. You can combine that with a time-stamp (meaning check who was in that position first using the game.timer). If A was there first, then when B moves in, A is out. If B was there first, then when A moves in, B is out.

    This could work for real-time but real-time since its happening at same time, I am not sure if GS allows comparison at microsecond level.

    Am I making any sense at all?
  • majjam13majjam13 Member Posts: 3
    Hi, i see the timer behavior, but how exactly do u get it to go by which is first.
Sign In or Register to comment.