11.10.2009, 23:21
EDIT: Found a way to sync traffic lights easily.
If you want your driver bot to sync to the red and green lights on the streets, this is all you have to do.
First - You make a recording of your choice (Ex. City Bus). Make a vehicle recording in a vehicle of your choice ( id 437 is a coach bus). Drive through your city, stop at bus stops(if thats what you want to do).Stop at red lights. You can make right on reds, but not a left. Go on green as soon as it turns green. And DO NOT RUN ANY YELLOW LIGHTS !
Second - DO NOT ADD YOUR NPC under OnGameModeInit !!
Instead, do it like this..
Код:
public OnGameModeInit() { SetTimer("BotConnect",30000, 0); // rest of your normal stuff goes here... }
Код:
forward BotConnect();
Код:
public BotConnect() { ConnectNPC("Driver","citybus"); print("BotTimerFinished"); }
Easy and it works, hope you can all benefit from it !
Jason