How do I compare x and collisions

Get help using Construct 2

Post » Sat Aug 16, 2014 3:09 am

hi,
i want to enable collisions of ennemy only if hes near my player
i use compare X of ennemy when it is >= 100 (100 is position of my player) then enable collisions
but i think that it will enable it every tick ... so i need to enable it just one time
thanks
B
45
S
16
G
8
Posts: 792
Reputation: 8,306

Post » Sat Aug 16, 2014 5:00 am

Add a System - Trigger once while true condition.
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Sat Aug 16, 2014 2:59 pm

triger once + Y (of ennemy) >= 100 then enable collisions of ennemy? like that ?
B
45
S
16
G
8
Posts: 792
Reputation: 8,306

Post » Sat Aug 16, 2014 3:07 pm

matrixreal wrote:hi,
i want to enable collisions of ennemy only if hes near my player
i use compare X of ennemy when it is >= 100 (100 is position of my player) then enable collisions
but i think that it will enable it every tick ... so i need to enable it just one time
thanks

Use, If Collisions disabled and Y >= 100 then enable collisions. This will prevent event from trigger every tick.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Sun Aug 17, 2014 2:13 am

Sisyphus wrote:
matrixreal wrote:hi,
i want to enable collisions of ennemy only if hes near my player
i use compare X of ennemy when it is >= 100 (100 is position of my player) then enable collisions
but i think that it will enable it every tick ... so i need to enable it just one time
thanks

Use, If Collisions disabled and Y >= 100 then enable collisions. This will prevent event from trigger every tick.


you mean by collisions desactivated = collisions enabled and invert this ??? yes ?
any way thanks
B
45
S
16
G
8
Posts: 792
Reputation: 8,306

Post » Sun Aug 17, 2014 9:08 am

matrixreal wrote:you mean by collisions desactivated = collisions enabled and invert this ??? yes ?
any way thanks

Yes, this will prevent every tick.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Sun Aug 17, 2014 1:17 pm

thanks sisphus
thats work perfect ... and the same is trigger once
thanks for spacedoubt too
B
45
S
16
G
8
Posts: 792
Reputation: 8,306


Return to How do I....?

Who is online

Users browsing this forum: darkrealos, JaredX, Rhindon and 21 guests