How do I Compare with Pick by Evaluate?

0 favourites
  • 3 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • I have several instances of an object, and when the player selects them the 'selected' variable becomes true, and after some seconds it becomes false again.

    This instances are divided into groups, and they have a variable 'group'.

    So, I am using the Pick by Evaluation event to pick all instances that are currently selected. What I need to do is to check if all the instances selected is of the same group - this is, if the variable 'group' is equal in all of them, or not.

    I would need something like:

    "Pick Obj by Evaluating Obj.selected" and "Compare if all the picked Obj's have the same Obj.Group"

    Any thought on how can I do this?

    Many thanks in advance :)

  • I don't think you can do this in one "Pick by evaluate" event..

    Here is my version, may not be the most efficient, but it works:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is my version, may not be the most efficient, but it works:

    Uuuhhh, that works! :) Clever!!! Nice dop2000 , many thanks man!!! ^^ :)

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