Jump to content

How to enable camera when input is disabled


lisabe96

Recommended Posts

While input is disabled on the client, I'd like camera movement to be enabled.

 

The reason is that I want to reach more tiles by moving the camera, but I don't want my character start

running around like a tard when clicking the tiles. Which happens with input is enabled.

So I'd only want camera input enabled.

 

f94GdNC.png

Edited by lisabe96
Link to comment
Share on other sites

Can't you just bind the selection processes to a key like s instead of a mouse click? I don't think the API supports mouse inhibition without the keyboard being in the same state. At least in the current build.

 

Maybe a way to enable input then programatically so the user doesn't have to bother about it.

Then maybe block mouse clicks from the game so the character doesn't move?

Link to comment
Share on other sites

I'd say use your code you posted in your other help post. Instead of using mouse clicked and drag listener, do one for key input. Possibly add a command that enables this sequence to be activated. Then do something to the extent of every time you press a key it will grab the tile the move is hovering over. Does that make sense? 

Link to comment
Share on other sites

I'd say use your code you posted in your other help post. Instead of using mouse clicked and drag listener, do one for key input. Possibly add a command that enables this sequence to be activated. Then do something to the extent of every time you press a key it will grab the tile the move is hovering over. Does that make sense? 

It makes sense but it's not as user friendly as I'd want it to be.

 

In case knowing the purpose would help to find ideas:

It's for a firemaking script where I'd like the user to be able to select the tiles to use.

This way I can allow them to make fire wherever they are, not limited by locations, also avoid the same patterns for everybody to be used.

Based on the selected tiles I internally build lines and patterns.

Link to comment
Share on other sites

It makes sense but it's not as user friendly as I'd want it to be.

 

In case knowing the purpose would help to find ideas:

It's for a firemaking script where I'd like the user to be able to select the tiles to use.

This way I can allow them to make fire wherever they are, not limited by locations, also avoid the same patterns for everybody to be used.

Based on the selected tiles I internally build lines and patterns.

 

Agreed I see how much time this would save the average person not to mention its kinda a dummy proof system(no such thing exist). Looking through I can't find a solution like you suggested without shutting down the mouse click on the game canvas. You could block mouse clicks at the time of selection and make the click itself void. I have few other ideas but not ones i'm sure that could be pulled off without testing.

Link to comment
Share on other sites

Agreed I see how much time this would save the average person not to mention its kinda a dummy proof system(no such thing exist). Looking through I can't find a solution like you suggested without shutting down the mouse click on the game canvas. You could block mouse clicks at the time of selection and make the click itself void. I have few other ideas but not ones i'm sure that could be pulled off without testing.

 

Currently the best I could come up with to keep it user friendly :p :

aDi50ue.png

 

giphy.gif

Link to comment
Share on other sites

And how would I disable input from the script?

 

http://osbot.org/api/org/osbot/rs07/Bot.html

 

The code you seek is in here, 

void   setHumanInputEnabled(boolean humanInputEnabled)

Sets whether or not human input is enabled.

This will allow you to control it via your script

Edited by BloodRush20
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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