Jump to content

Paint an rs2object?


RickyD

Recommended Posts

Can someone help me out?
 
Which method is Graphics2D allows for me to paint the wireframe of an RS2Object?

FIXED
 

I checked ObjectDebug, first you check if the object is visible on the screen:
 

if(GraphicUtilities.getScreenCoordinates(bot,obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getHeight()))[0] != -1) {

   GraphicUtilities.drawModel(bot, g, obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getModel());

}
Edited by RickyD
Link to comment
Share on other sites

GraphicUtilities.drawModel

Thanks!

 

But how would I use it to paint, lets say a bank booth?

Just going from memory here.. but try something like this

 

draw(obj.getModel().getArea(obj.getGridX(), obj.getGridY(), obj.getZ()))

It worked, but it spazzes out, drawing little fragments of it.  Never the whole booth

Edited by RickyD
Link to comment
Share on other sites

Thanks!

 

But how would I use it to paint, lets say a bank booth?

I checked ObjectDebug, first you check if the object is visible on the screen:

 

if(GraphicUtilities.getScreenCoordinates(bot,obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getHeight()))[0] != -1) {

   GraphicUtilities.drawModel(bot, g, obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getModel());

}
Link to comment
Share on other sites

 

I checked ObjectDebug, first you check if the object is visible on the screen:

 

if(GraphicUtilities.getScreenCoordinates(bot,obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getHeight()))[0] != -1) {

   GraphicUtilities.drawModel(bot, g, obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getModel());

}

Yep that works.  I don't know how to read the ObjectDebug :(

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...