|
Hi! I have a question. I have this script: } How can i add timer to it? Like this. AI will go through all waypoints and then stops for 5 seconds and then go through those waypoints again and then again stops for 5 seconds and do it again in loop.
(comments are locked)
|
|
Hope this helps, put the number of way points you want to use in the inspector then drag your waypoints in to the inspector. Nope. That doesnt work. when i hit play that cube just stands there and isnt doing anything. here is my inspector: http://imageshack.us/photo/my-images/94/patrolinspector.png/
Aug 08 '12 at 12:48 PM
subzul
Sorry forgot to say add a character controller to the cube, replace the box collider ...
Aug 08 '12 at 12:57 PM
Griffo
Sorry, still nothing and i replaced box collider with character controller. but when i hit play nothing happens.
Aug 08 '12 at 01:04 PM
subzul
Have a look at my pic in the answer further up, I've just made a new scene with a cube with a character controller and 3 empty game objects for my waypoints and dragged them into the inspector and it works fine .. with the script dragged onto the cube .. I've added the .js file to the above answer ..
Aug 08 '12 at 01:08 PM
Griffo
Thanks a lot. It works perfectly now.
Aug 08 '12 at 01:23 PM
subzul
(comments are locked)
|
