Jewlz 3 Share Posted March 1, 2017 Looked at API, only seems to be this for characters or NPCS, not game objects such as trees, rocks etc.. Link to comment Share on other sites More sharing options...
triblion 56 Share Posted March 1, 2017 Looked at API, only seems to be this for characters or NPCS, not game objects such as trees, rocks etc.. Instead of NPC, replace it with GameObject, it has been a while since I have actually written anything so I can't give you specifics but it is just a matter of replacing it with GameObject. Link to comment Share on other sites More sharing options...
Jewlz 3 Author Share Posted March 1, 2017 Instead of NPC, replace it with GameObject, it has been a while since I have actually written anything so I can't give you specifics but it is just a matter of replacing it with GameObject. According to the API it wont return anything that isnt a character public Character getCharacterInteractingWithMe() Gets the Character currently interacting with this Character. If none interacting, returns null. Link to comment Share on other sites More sharing options...
Im A Baller 348 Share Posted March 1, 2017 Looked at API, only seems to be this for characters or NPCS, not game objects such as trees, rocks etc.. save it as a variable after interaction Link to comment Share on other sites More sharing options...
Nuclear Nezz 2059 Share Posted March 1, 2017 The interacting with is a hook in the gamepack, but only works for npc/player. If you want the game object you'll have to get your orientation, and get the tile you're facing (assuming you're standing next to it) Otherwise like Baller said, save it as a variable when you start interacting with it. Link to comment Share on other sites More sharing options...
Jewlz 3 Author Share Posted March 1, 2017 Alright cheers for the input Link to comment Share on other sites More sharing options...
Dioxin 29 Share Posted March 1, 2017 Kinda wished the API did it for us /: Item has the same issue: https://dreambot.org/forums/index.php/topic/4093-item-extends-interactable/ Checking for interaction isn't an issue for Item, but being able to interact with it polymorphically would definitely help. Currently, it's up to the user's to write their own wrappers if needed Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.