NPC Car

For questions about using Classic.

Post » Fri Mar 12, 2010 9:47 pm

I tried making an NPC with a Car Behavior, but couldn't make it accelerate. If I use "Set Acceleration", it just doesn't accelerate, and if I try "Set Speed", it just goes straight to that speed without accelerating...

[code:2xlrq7ku]
System: Always (every tick)
> NPC Set angle towards Sprite 0
> NPC Set 8-dir angle of motion to Sprite3.Angle
> NPC Set speed to 350
[/code:2xlrq7ku]
B
2
G
2
Posts: 16
Reputation: 682

Post » Fri Mar 12, 2010 9:51 pm

It works for me with the Sprite. What do you mean "NPC"?

Edit: I didn't check out that code though. Maybe making the speed 350 every tick is the problem, when you probably only need to set it once?
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Fri Mar 12, 2010 9:52 pm

A sprite with Car Behavior which moves without player control.
B
2
G
2
Posts: 16
Reputation: 682

Post » Fri Mar 12, 2010 9:54 pm

Um... try not setting the speed every tick, and see if that works. Set it at start/creation.
B
7
S
2
G
3
Posts: 110
Reputation: 1,926

Post » Fri Mar 12, 2010 10:02 pm

Doesn't work because it ends up decelerating... Also, sorry for the confusion I probably caused, but I meant 8-Direction. The player is the car, actually...
B
2
G
2
Posts: 16
Reputation: 682


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests