FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionhelp with AI script

more_horiz
hi all,
i recently made this basic AI script but it simply doesn't work please help. (note any errors and BTW im using Monodevelope)
Thanks,
Kale
https://servimg.com/image_preview.php?i=2&u=18917785][img]https://i.servimg.com/u/f39/18/91/77/85/script11.jpg

Note: i keep getting this error while playing
NullReferenceException
UnityEngine.Transform.get_position () (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/UnityEngineTransform.cs:27)
enemytest.Update () (at Assets/enemytest.cs:22)

descriptionRe: help with AI script

more_horiz
Ok, have you added a tag to the player? If you haven't then you can add a tag in :edit -> tags (change the value of number of tags) then name one "Player", it is case sensitive in accordance to the script, make sure you go to the player gameobject, and change the tag in the inspector.
This should work Smile

_________________
-BryceCain25

descriptionRe: help with AI script

more_horiz
Dont worry its all good. with
void Start ()
it was a lowercase s. funny something that small can mess it up. also can you help me with a gun recoil script or point me in the right direction with one thanks.
Permissions in this forum:
You cannot reply to topics in this forum