On Bounce

For questions about using Classic.

Post » Mon Jan 18, 2010 4:31 pm

In my car game every time it hits the wall I deduct from its top speed due to damage.

The problem is that in a tight hair pin turns you can bounce back and forth so much that the car is wrecked. But If I use the stop command the car stays in contact with the wall and continues to take damage until it can not move.

Any ideas how make this work?

I wish you could control, the amount of bounce and dampen it.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Mon Jan 18, 2010 6:43 pm

Only apply the damage while the car is travelling, by checking the velocity.

Should work.

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Mon Jan 18, 2010 11:58 pm

I got this to work but there has to be a better way. I found it my just guessing. Construct was not very intuitive here. It took me 30 minutes of playing. Coding would have taken 30 seconds.


Car On Bounce
Sub-event) Car Is Moving: Car Stop
(Sub-event) Trigger Once: MaxSpeed - Car[Car].MaxSpeed -25
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Tue Jan 19, 2010 1:12 am

Car behavior isn't something that people use very often so it may have been a little neglected as far as features go. You're on the right track, though... just keep experimenting until you find what works. Even something as feature-heavy as Platform still needs extra events to add functionality to it.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests