Botre Posted June 22, 2014 Posted June 22, 2014 Ok, so I have an Entity variable holding the value of an entity (not null). When I walk away far enough or teleport away, this variable's value becomes irrelevant: when you walk back to the initial Entity the value does not refer to that same Entity anymore (I doesn't refer to anything anymore actually). I suppose this is because the game reloads and a new reference is given, if I'm wrong about this please inform me Is there a way to store the initial value so that it does not become irrelevant whenever an entity is reloaded? I'm thinking about storing data of the initial Entity and then re-scanning for that data, but kinda hoping for a better solution :p 1
Laz Posted June 22, 2014 Posted June 22, 2014 The way our wrapper system works is simply to wrap the client's reference of the entity. Unfortunately because of the way the RuneScape game engine works, there exists the situation which you have described. If it's a player or npc, you can call .getIndex() to get the player or npc's index on the client's global list. For objects you can do .getUID() to get the unique hash of the object. 3
Botre Posted June 22, 2014 Author Posted June 22, 2014 The way our wrapper system works is simply to wrap the client's reference of the entity. Unfortunately because of the way the RuneScape game engine works, there exists the situation which you have described. If it's a player or npc, you can call .getIndex() to get the player or npc's index on the client's global list. For objects you can do .getUID() to get the unique hash of the object. Ah beast! Exactly what I was looking for ty! 1