griever7x Posted August 25, 2016 Share Posted August 25, 2016 Greetings, I'd like to make a ranger/hunter bow that, when wielded close to a tree, will make the player invisible.However I'm not sure how to achieve this with a script ( I'm still a novice ). Any help? Thanks in advance! Link to comment Share on other sites More sharing options...
Elias555 Posted August 25, 2016 Share Posted August 25, 2016 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 loopI think that should work. Good idea by the way. Link to comment Share on other sites More sharing options...
griever7x Posted August 25, 2016 Author Share Posted August 25, 2016 Okay, I think I understand how the script works; if I need further help I will post back.Thanks a lot! Link to comment Share on other sites More sharing options...
Recommended Posts