Physics objects stop following after wrap!

For questions about using Classic.

Post » Wed May 18, 2011 11:37 am

I posted a problem that might not be able to be solved earlier, so I took another alternative I thought would work. Heres the problem:

I decided to go for the wrap effect in order to simulate an enless space... problem is... enemy objects in my game all have physics behaviour. After the player wraps, enemies stop following it.

Is there a way to simulate it so the enemies follow the player through the wrap?
B
1
G
1
Posts: 2
Reputation: 429

Post » Wed May 18, 2011 4:22 pm

[quote="EpicTortoise":q8crxj32]I posted a problem that might not be able to be solved earlier, so I took another alternative I thought would work. Heres the problem:

I decided to go for the wrap effect in order to simulate an enless space... problem is... enemy objects in my game all have physics behaviour. After the player wraps, enemies stop following it.

Is there a way to simulate it so the enemies follow the player through the wrap?[/quote:q8crxj32]

Maybe have a state "FollowingPlayer" that keeps them going in the same direction when they don't see the player anymore and the player just warped. Then when they get through the warp and see the player again set the state back to "Normal".

Otherwise I'd recomend creating an invisible object where the player warps from, that attracts the enemies to it. Then you can just destroy it after it has been on the map for a certain amount of time.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Wed May 18, 2011 7:04 pm

Maybe the portal maths could be usefull^^ David made a good example .cap :)
B
24
S
9
G
2
Posts: 294
Reputation: 3,160


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest