Jump to content

Script to detect trees


griever7x

Recommended Posts

The tools that will be needed:

Formlist Property MyTreeList Auto ;Haven't checked, but you should be able to shove all the trees into a list.

ObjectReference NearestTree =  Game.FindClosestReferenceOfAnyTypeInListFromRef(MyTreeList, Self, 500) 

If NearestTree == True
   Cast your invisible spell
EndIf

Not sure on the event, but it needs to use RegisterForSingleUpdate(1) to constantly check for a tree. Or a while loop

I think that should work. Good idea by the way.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...