Gimp Posted October 6, 2015 Posted October 6, 2015 So i've remade one of my old scripts and it works 100%. But it is slowed down by the client randomly turning the camera, before attacking an npc, before clicking the bank booth, etc. Is there a code to just keep the camera angle in one position the whole time throughout every interaction like below? Thx
Apaec Posted October 6, 2015 Posted October 6, 2015 (edited) k I'll write you a snippet below using (without IDE so please forgive and typos) - I'm on mobile too lol RS2Object o = objects.closest("Bank"); //null checks here blah InteractionEvent e = new InteractionEvent(o,"Use"); e.setOperateCamera(false); execute(e); Apa PS you should read up on interaction event here - http://osbot.org/api/org/osbot/rs07/event/InteractionEvent.html#setOperateCamera-boolean- It's really useful Edited October 6, 2015 by Apaec 1
Gimp Posted October 6, 2015 Author Posted October 6, 2015 k I'll write you a snippet below using (without IDE so please forgive and typos) - I'm on mobile too lol RS2Object o = objects.closest("Bank"); //null checks here blah InteractionEvent e = new InteractionEvent(o,"Use"); e.setOperateCamera(false); execute(e); Apa PS you should read up on interaction event here - http://osbot.org/api/org/osbot/rs07/event/InteractionEvent.html#setOperateCamera-boolean- It's really useful Thx, i couldn't understand how to use them properly
Gimp Posted October 6, 2015 Author Posted October 6, 2015 k I'll write you a snippet below using (without IDE so please forgive and typos) - I'm on mobile too lol RS2Object o = objects.closest("Bank"); //null checks here blah InteractionEvent e = new InteractionEvent(o,"Use"); e.setOperateCamera(false); execute(e); Apa PS you should read up on interaction event here - http://osbot.org/api/org/osbot/rs07/event/InteractionEvent.html#setOperateCamera-boolean- It's really useful Works perfectly, thank you 1