Expression of nth picked instance

  • There is a condition called pick nth instance but it only can pick one instance at a time. I want to retrieve the expression of multiple particular instances to compare with in 1 condition like the compare 2 values condition. For example, sprite(0).X and sprite(1).X will do the job if im selecting all instances. But now since some of the my instances has been filtered out by events and not all of them are selected, entering sprite(0).X is not desirable because it is picking the instance with IID 0 instead of the instance after filtering. How do I retrieve it?( I want to know the format when typing expression,not a workaround)

  • From just expressions you can't do that. You have to use conditions to pick particular instances.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use Function param to set UID or IID on function execution to pick specificed instance.

  • To obtain the value for the Function parameter, I have to use the Pick Nth Instance condition, create variable to remember them and set the variable to the Function parameter. If I have a large number of instances to pick, i will need an equal number of variables to store them,which will be troublesome.

    However, it is very nice that if there is a new expression which is associated with the nth picked instance in addition to IID.

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