Pick with lowest/highest[solved]

This forum is currently in read-only mode.
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.
  • Doesn't seem to work as I expected, so I must be missing something? Simply create 3 instances with an always that sets a pvariable to .x.and put one instancee in the middle.

    Enemy: 210 Enemy: Pick with lowest ''x''

    Enemy: 210 Enemy: Pick with highest ''x''

    EnemySet filter to 0

    BTW, I just copied and pasted in this form. The lowest/highest x are supposed to be inverted, I don't know if d is supposed to not show that or not. Anyway, this inverted event seems to pick whatever one I put first in the condition.

    [solution] this does this because pick by conditions arent meant to be inverted so, it will be as if you picked the object instead of inverting to make it not pick like you do with key down event or such. it is a bug in the sense that it allowed you to invert when it doesnt do anything.

  • post a screenshot

    I can't tell what's a subevent, and whats another condition in the same event

    but there are two ways you can do this

    one that uses variables, and one that uses double families

    the private variables method:

    enemy pick with highest x

    highX=.x

    a new event

    pick with lowest x

    lowX=.x

    then set your middle enemies x to lowX+((highX-lowX)/2)

    or you could set it to lerp(lowX,highX,0.5)

    the way with families would be

    make the enemies members of two families

    let's say low is blue, and high is red

    Red pick with highest X

    subevent(blue pick with lowest x)

    create new enemy x at blue.x+((red.x-blue.x)/2)

    or lerp(blue.x,red.x,0.5)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [solved]

  • Here's a simplified pic, which ever condition you put first will ?urn ?lack. Interesting enough, just inverting ?ne ?n it's own event by itself actually PICKS the ?ower/highest doing the opposite. <img src="http://img14.imageshack.us/img14/9859/postimagetodelete.png">

    The ?hing is ? thought it was annoying that it didn't ?ork as expected because the event ? had it ?n was ?ong and thought ? did something wrong somewhere as usual, but luckily because ?f the way ? ?et up my events ? already had a way around it.

    As for your solution, ?ell the event this was ?n wasn't actually that ?imple and was meant to ?ork for any instances that was between the highest and lowest and required inverting to ?ick the rest, but it's already taken care ?f. Thanks.

    I got most of that, but I'll have to brush up on my korean a bit before I can properly respond

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