GetDistance question

Post » Fri May 27, 2011 3:56 pm

I'm going to give for example a skull. Lets say that the skull's ID is skull.
Would player.GetDistance skull work? If there are multiple skulls, it would need to choose one, right?

Since it probably (not sure) doesn't work, is there any way to see if the player's distance to a skull(the closest?) is shorter than a certain number?

Sorry if the question is confusing and thanks for the help.
User avatar
Darren Chandler
 
Posts: 3361
Joined: Mon Jun 25, 2007 9:03 am

Post » Fri May 27, 2011 12:07 pm

I'm going to give for example a skull. Lets say that the skull's ID is skull.
Would player.GetDistance skull work? If there are multiple skulls, it would need to choose one, right?

Since it probably (not sure) doesn't work, is there any way to see if the player's distance to a skull(the closest?) is shorter than a certain number?

Sorry if the question is confusing and thanks for the help.

It's always best to use ref.getdistance player. Especially if you are checking distance from other cells.
Each object you want to check distance on will need its own reference, i.e. skull1, skull2, skull3, etc.


Edit: Oops. I DID mean ref.getdistance. Corrected.
Again, thanks TTT for pointing out I should pay more attention to what I write.

User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Fri May 27, 2011 8:08 am

Reference IDs and object IDs are different things. You cannot call getDistance on an object ID.
User avatar
NAtIVe GOddess
 
Posts: 3348
Joined: Tue Aug 15, 2006 6:46 am

Post » Fri May 27, 2011 9:43 am

So it can't be just any random skull, I must give an ID to it?
User avatar
carley moss
 
Posts: 3331
Joined: Tue Jun 20, 2006 5:05 pm

Post » Fri May 27, 2011 2:16 pm

So it can't be just any random skull, I must give an ID to it?

Correct.

You need to find that particular skull (or place one where you want it in the cell) and then double click the object in the render window or cell view and give it an ID that can then be used in the script.

I don't think theres anyway of making it work for all skulls in the game, which I'm guessing is what you're after.

I don't know how many skulls there are manually placed in the game, you could go through all of them giving them each a unique ref. Other than that, I dunno how you would do that.
User avatar
Shianne Donato
 
Posts: 3422
Joined: Sat Aug 11, 2007 5:55 am

Post » Fri May 27, 2011 10:50 am

I see, thanks anyway. I was already expecting that, but I needed to check anyway. Thanks.
User avatar
Marie Maillos
 
Posts: 3403
Joined: Wed Mar 21, 2007 4:39 pm


Return to IV - Oblivion