Results 1 to 7 of 7

Thread: Model ID's aren't where they should be

  1. #1
    Join Date
    Jan 2012
    Posts
    915
    Mentioned
    13 Post(s)
    Quoted
    87 Post(s)

    Default Model ID's aren't where they should be

    I'm working on learning to script with ogl, and an issue I'm running into is that the id's of the rocks I'm trying to mine aren't on the rocks. It's a good ways away from them, actually.

    Puush isn't working on my computer right now, so I can't give screenshots.

    What is causing the offset? How do I fix it?

  2. #2
    Join Date
    Jun 2007
    Location
    Michigan
    Posts
    269
    Mentioned
    2 Post(s)
    Quoted
    141 Post(s)

    Default

    Quote Originally Posted by Vinyl Scratch View Post
    I'm working on learning to script with ogl, and an issue I'm running into is that the id's of the rocks I'm trying to mine aren't on the rocks. It's a good ways away from them, actually.

    Puush isn't working on my computer right now, so I can't give screenshots.

    What is causing the offset? How do I fix it?
    Ive had that problem when my layout wasn't RS3 Default and resizable.

  3. #3
    Join Date
    Jan 2012
    Posts
    915
    Mentioned
    13 Post(s)
    Quoted
    87 Post(s)

    Default

    I didn't know it had to be resizable. That's probably the issue.

    Thanks!

    Nice pic in the sig, btw.

  4. #4
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    It doesn't have to be resizable. You have to use ogl.setViewPort() to the dimensions of the 3D world. If using the Old School layout, the ViewPort is 0,0,576,388.




    Skype: obscuritySRL@outlook.com

  5. #5
    Join Date
    Jun 2007
    Location
    Michigan
    Posts
    269
    Mentioned
    2 Post(s)
    Quoted
    141 Post(s)

    Default

    Quote Originally Posted by Vinyl Scratch View Post
    I didn't know it had to be resizable. That's probably the issue.

    Thanks!

    Nice pic in the sig, btw.
    Thanks, that's my baby on the right :P

  6. #6
    Join Date
    Jan 2012
    Posts
    915
    Mentioned
    13 Post(s)
    Quoted
    87 Post(s)

    Default

    Quote Originally Posted by IROC-Z View Post
    Thanks, that's my baby on the right :P
    That's sweet! I've got an almost all stock s13 at the moment


    Edit: I'm an idiot and didn't see Obscurity's post.

  7. #7
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Sorry guys, I didn't realize I hadn't yet pushed the update that had ogl.setViewPort(). Here:
    Simba Code:
    function ogl.setViewPort(X1,Y1,X2,Y2:int32):boolean;
    begin
      exit(glxViewPort(X1,Y1,X2,Y2));
    end;

    If using the old school layout in your scripts, use...
    Simba Code:
    ogl.setViewPort(0,0,576,388);
    ...somewhere in your script. You might have to rerun the script - as it can fail if called too soon after SMART is created.
    Last edited by Obscurity; 10-13-2015 at 02:17 AM.




    Skype: obscuritySRL@outlook.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •