Jump to content

Code for absolute Zero Camera Movement?


Recommended Posts

Posted

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

 

 

skuB8CF.png

Posted (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 by Apaec
  • Like 1
Posted

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

Posted

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

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...