Pick All is not choosing all instances of the chosen Object

Bugs will be moved here once resolved.

Post » Fri Sep 12, 2014 4:13 am

Problem Description
I use Pick All and then I reference all instances of 1 object to determine the distance another object is to any of them and this is not working.

Attach a Capx
please find he Capx linked has to be zipped as per the upload constraints of file host :
http://snk.to/f-c7n8gfik

Description of Capx
player walks around with Arrow Keys.. Attacks with Spacebar.

Enemies should be spawning in and being forced to remain 1000px from each other spawned enemies is capped.

I have further tested this and can confirm this is an issue as I manually specify all possible IID's for instances that can spawn and suddenly they function as expected.. but pickall should have chosen all IID's and performed the same function.

Steps to Reproduce Bug
  • Step 1 - run the capx
  • Step 2 - walk around and notice how many enemy objects are overlapping.

Observed Result
As per above enemies are spawning in on top of each other even though the code should be forcing them not to be able to do this with 2 different conditions.. so I don't get how it can unless there is a bug.

Expected Result
Enemies to never spawn overlapped

Affected Browsers
  • Chrome: (YES/)
    others prolly the same I just only tested in chrome.

Operating System and Service Pack
Win 8.1

Construct 2 Version ID
r197
B
6
S
1
Posts: 72
Reputation: 723

Post » Fri Sep 12, 2014 2:22 pm

Closing as not a bug, your events are wrong. You measure the distance with 'compare values', and since you have picked all enemies, it uses whichever is the first one when you retrieve an expression from Enemy (such as Enemy.X and Enemy.Y in the distance expression). So it can spawn an enemy anywhere 1000px away from the first enemy only, not any enemy. This is what your events say and it is working correctly.
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,155

Post » Fri Sep 12, 2014 11:39 pm

Oh so there is no way to compare the distance to all instances of an object without specifying their unique iid`s. Well sorry for the mizspodt i somehow thought based on the documentation i read that pickall would make it work but pickall must only be relant to actions
B
6
S
1
Posts: 72
Reputation: 723

Post » Sat Sep 13, 2014 12:06 am

Instead of "Pick all" use "For each", and this way you can get to compare the distance the way you did it for each instance.
In this case you need to specify you want the "compare two values" condition to be applied to all instances.

On another note, capx files are already zip files. It sounds like all your host wants is a renaming to .zip not an actual compressed file.

"Pick all" helps to get back to picking all the instances of an object type once you're already deep in an event/sub event that was picking only a specific instance and you find yourself needing to pick "back" all the instance, and possibly specifically pick them again.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,332
Reputation: 71,306


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests