Sentry Distraction

Get help using Construct 2

Post » Sun Jan 06, 2013 4:48 am

So I'm trying to make a game, that when a stone is fired from the player, and hits a wall, it will make a sound (represented graphically). If a sentry is close enough, it will move to the sound, and once it has disipated, the sentry will move back to the position it came from.

The issue is, I can't seem to get the sentry to go back to its original position. I'm sure it's a minor line of code, that I am overlooking, and have stripped back most of the game so it's just a basic .CAPX file.

If anyone could have a look at it for me, and solve this issue, it would be greatly appreciated

https://dl.dropbox.com/u/108799982/Capx%20Demos/Sentry.capxemoaeden2013-01-06 04:54:22
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125

Post » Sun Jan 06, 2013 4:42 pm

The problem is when you set the angle to move back, once back, the Bounce off solid property of Bullet causes it to bounce at an angle. You need to add logic to detect when it has reached its starting point (within reason) and then reset the original angle and position.
ImageImageImage
B
67
S
19
G
124
Posts: 3,219
Reputation: 74,425


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests