[SCRIPT] How do i get entityID outside click function


How to get entity ID outside function ?

I need the entityid as soon the script start to run. But this is not working.

  var  Ent = entityID;    

How do i get the entity ID, without a click event ?


@Richardus.Raymaker perhaps this is what you’re looking for: http://jsref.docs.highfidelity.com/docs/clickdownonentityentityitemid-mouseevent


It’s a strange hack to get entity id globel. but it seems to work. except playing sounds in wronmg way is screwing things complete with 5029.


@Richardus.Raymaker the ‘preload’ method of an entity gets the entity id as soon as the entity is ‘seen’ by a user. so something like

  var thisEntityID;
 this.preload=function(entityID){ thisEntityID = entityID}


Thanks, that works. Would be nice if this where on the docs page. We really need a wiki.


We have one.

but I just tried to create an account and it takes me to a blank white page…


are you aware of this?


But, that’s old topic.
@Caitlyn talked last meeting about that High Fidelity is getting a Wiki.
And that’s all i know. Waiting for more info.


Spaceships and aliens. Forget I said anything. :wink:


wow i did a search of the docs site for ‘preload’ - you’re right that’s totally undocumented… :frowning2: i’ll see what i can do about that