Results 1 to 6 of 6

Thread: Doors!

  1. #1
    Join Date
    Jun 2006
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Doors!

    In this tutorial we will learn how to open doors.
    This tutorial starts assuming you know how to use all the bold and red functions.


    There are a couple of ways we can check if a door is open or closed:

    MMouse

    We can move the mouse to the door and check IsUpText('pen'). This may look very "botty" since you will have to check every time you want to go through the door.

    FindColorTolerance

    We can tilt the screen down and check if we can find the color of the door with a high tolerance. If it is found then some people still like to use IsUpText(). This is the second best way.

    DTM's

    There are two ways we can use DTM's to open doors:

    FindDTMRotated

    We can keep the view from upbove and create a DTM of the door from the top angle. We can then store it in a varibile and check if the found DTM angle is between > 5 or < 1 (6 is approx 360 degrees). If it finds that and the compass is north, and the door east or west then the door is shut. We need to open it so move the mouse to the x and y vars it returned and click. Prehaps use IsUpText('pen') just to check.


    Please post comments on how I could improve and if it was useful.

  2. #2
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    give examples(test code) of each, and i'll call it a tut by my perspective =p

  3. #3
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    thats ok...but could u use a procedure that used a DTM of the red line for the door? and if it was verticle, then Exit; if horizontal then door opening procedure. But theonly problem is you would need to search only pat of the minimap...can u do that?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  4. #4
    Join Date
    Jun 2006
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Doors on the MM look closed when they are open... I might add some code samples later

  5. #5
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    dang...grrrr i thought that would work...harrrrumphh
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  6. #6
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. For Opening Doors...
    By 0lumpy in forum OSR Help
    Replies: 10
    Last Post: 01-19-2009, 12:57 AM
  2. 3 doors, should you swap?
    By boberman in forum News and General
    Replies: 15
    Last Post: 12-08-2008, 11:48 AM
  3. Doors
    By Boreas in forum OSR Intermediate Scripting Tutorials
    Replies: 20
    Last Post: 09-08-2008, 05:07 PM

Posting Permissions

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