Jewlz 3 Posted March 1, 2017 Looked at API, only seems to be this for characters or NPCS, not game objects such as trees, rocks etc..
triblion 56 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.
Jewlz 3 Author 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.
Im A Baller 348 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
Nuclear Nezz 2104 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.
Dioxin 29 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.