Jump to content

Need a little script help


DaemonGrin

Recommended Posts

Take a look at your usage of "GetDistance". There are a couple of things about it.

 

One: This is an easy to make mistake, you've just forgotten to to put in a dot after "player". It should read "Player.GetDistance". :smile:

 

Two: You haven't included the reference for GetDistance. It needs two references to function. You need to change that to "if VRCrWalkingEye.GetDistance Player <= 256"

 

One other thing occurs to me, is "VRCrWalkingEye" a persistent reference? Also, is this only for one creature, or are you planning on doing it for multiple?

Edited by Jojash
Link to comment
Share on other sites

all of them. there will be a certain number and no others exist in the game. No it isn't persistent forgot with a ref it needs to be persistent, right? lol

Link to comment
Share on other sites

No, it doesn't have to be persistent. The reason I'm asking is because if it's not and you're using multiple, I can offer a much easier way than giving every single one it's own persistent reference. :smile:

 

Just add in a ref variable, something like, "ref rWalkingEye" and then before the first "if" add:

 

(You might also want a short variable so that this doesn't keep happening every iteration, I'll include one, but you don't have to.)

 
    if iDoOnce == 0
            set rWalkingEye to GetSelf
            set iDoOnce to 1
    endif

Then replace "VCRrWalkingEye" with "rWalkingEye" (Or whatever you've named it.)

Edited by Jojash
Link to comment
Share on other sites

Meh just gonna use the static mesh Walking Eye's I can hide them better. I got it to flee by making them hostile but cowardly etc so they ran away but then I realized its no fun having them on the compass atleast if they are not marked on the compass it would be harder XD. Then I also figured if one clipped through the mesh or something while fleeing it would be impossible to complete.

 

Thanks for all the help though!

 

Geoff

Edited by DaemonGrin
Link to comment
Share on other sites

  • Recently Browsing   0 members

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