questions

Get help using Construct 2

Post » Thu Apr 19, 2012 4:48 pm

Here's question:
For ex. I have 2 same "object1" and one "object2". When distance(object1.x, object1.y, object2.x, object2.y) > 60, "object1" move towards "object2". How do I make only move only "object1" which meet these parameters, not every "object1"?

Thanks in advice.
B
11
S
3
G
6
Posts: 193
Reputation: 4,234

Post » Thu Apr 19, 2012 6:08 pm

Would an instance boolean solve your problem?

[code]distance(object1.x, object1.y, object2.x, object2.y) > 60
-> Set instance boolean moving to true

moving is true
-> object1 move towards object2[/code]
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Apr 19, 2012 6:15 pm

nope. it doesnt help ;)
B
11
S
3
G
6
Posts: 193
Reputation: 4,234

Post » Thu Apr 19, 2012 10:39 pm

Hmm, I might have misunderstood your problem, do you mean something like this?

Example DistanceMoveTowards.capx
B
27
S
8
G
8
Posts: 903
Reputation: 8,452


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests