How do I Keep Two objects near eachother

Get help using Construct 2

Post » Mon Apr 07, 2014 1:10 pm

No you have ended up with the same picking mistake as so many others :D

Image

Every time you use an object, like you have done in the area I have marked with red, you do picking. It doesn't matter if it says "pick" in front or not.

Rule
Whenever you use an object in a condition it will do picking!! doesn't matter what thing you are using, width, opacity, a variable or something else.


So the problem occurs as you already in the Trigger pick one object which is the line that are destroyed. So now you have 1 object selected.

So no matter what conditions you add afterwards, they will only be checked against this object. So you need to reset the picking. You can do that if you use the system action "Pick All Lines". That will Pick all lines regardless of any former conditions,

From manual
Pick all
Reset the picked objects back to all of them. Subsequent conditions will pick from all instances again instead of filtering from only those meeting all the conditions so far. See How events work for more information on how instances are picked in events. Useful in subevents to start affecting different instances again.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Mon Apr 07, 2014 11:43 pm

nimos100 wrote:No you have ended up with the same picking mistake as so many others :D

Image

Every time you use an object, like you have done in the area I have marked with red, you do picking. It doesn't matter if it says "pick" in front or not.

Rule
Whenever you use an object in a condition it will do picking!! doesn't matter what thing you are using, width, opacity, a variable or something else.


So the problem occurs as you already in the Trigger pick one object which is the line that are destroyed. So now you have 1 object selected.

So no matter what conditions you add afterwards, they will only be checked against this object. So you need to reset the picking. You can do that if you use the system action "Pick All Lines". That will Pick all lines regardless of any former conditions,

From manual
Pick all
Reset the picked objects back to all of them. Subsequent conditions will pick from all instances again instead of filtering from only those meeting all the conditions so far. See How events work for more information on how instances are picked in events. Useful in subevents to start affecting different instances again.



Such a beautiful post to get back from work and read. Expect a full (hopefully working) demo shortly!
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Post » Tue Apr 08, 2014 10:10 pm

Changed things over, fixed a few new bugs and, I must say, results are rather nice.

Here is a non-gameplay visual demo of what was done! https://dl.dropboxusercontent.com/u/583 ... index.html

Simply click to get things moving!

Things to note:
Randomly generated smooth/flowing line! No Gaps! Even with speed changes!

The above post gives an idea of what i did. I ended up trashing the idea of using set spawners and instead each line segment acts as its own spawner! The trick was picking the correct line to spawn from.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Previous

Return to How do I....?

Who is online

Users browsing this forum: Sparkz and 2 guests