Thread: [PI]Doors

Results 1 to 6 of 6
  1. #1 [PI]Doors 
    Registered Member
    LeBron James's Avatar
    Join Date
    Jan 2009
    Posts
    1,510
    Thanks given
    166
    Thanks received
    129
    Rep Power
    165
    Hey guys, I'm trying to add a door that can move you to another spot when you click on it. And when you want to get out, you click on it again to get out.

    Here's the code I wrote up

    Code:
    case 6114:
    			if (c.objectX == 2862 && c.objectY == 10199);
    				c.getPA().movePlayer(2863, 10199, 0);
    			if (c.objectX == 2862 && c.objectY == 10199);
    				c.getPA().movePlayer(2862, 10199, 0);
    		break;
    I wanted the the player to move to other side of the door once clicked on but when they want to get out, they can't and that's the problem i'm having is making them go out the door the way they came in.



    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Code:
    				case 6114:
                            				if (c.objectX == 2862 && c.objectY == 10199)
                                     				c.getPA().movePlayer(2863, 10199, 0);
                            				else if (p.absX == 2863 && p.absY == 10199)
                                     				c.getPA().movePlayer(2862, 10199, 0);
                     			break;
    Try something like that, I think it should work, only thing I'm sure about is checking the players absX and absY.

    Edit: New code, it should work.
    sweet
    Reply With Quote  
     

  3. #3  
    Registered Member
    LeBron James's Avatar
    Join Date
    Jan 2009
    Posts
    1,510
    Thanks given
    166
    Thanks received
    129
    Rep Power
    165
    Quote Originally Posted by 'Alien View Post
    Code:
    case 6114:
                            if (c.objectX == 2862 && c.objectY == 10199);
                                     c.getPA().movePlayer(2863, 10199, 0);
                            else if (c.absX == 2863) && (c.absY == 10199)
                                     c.getPA().movePlayer(2862, 10199, 0);
                     break;
    Try something like that, I think it should work, only thing I'm sure about is checking the players absX and absY.

    The "else if and &&" gives me an error :\



    Reply With Quote  
     

  4. #4  
    #Winning

    Join Date
    Apr 2011
    Age
    28
    Posts
    2,245
    Thanks given
    367
    Thanks received
    388
    Rep Power
    1187


    Vouches
    Spoiler for Vouches:

    Quote Originally Posted by Exile rsps View Post
    Vouch thanks for that pic
    Quote Originally Posted by bwuk _im_pb View Post
    i vouch for charlie hes legit
    Quote Originally Posted by Pastaway
    Vouch for 'Charlie. Added a tut to my server I couldn't add and payed him after =]
    Quote Originally Posted by mongolias
    Vouch for 'Charlie. Sold me a banner, the trade went quick and efficiently.
    Quote Originally Posted by Lane
    Vouch for charlie, he is #1
    Quote Originally Posted by Raw Envy View Post
    Vouch for Charlie.
    Quote Originally Posted by -Null Code-
    Vouch Legit bought rs membership
    Quote Originally Posted by tucybro
    Traded with Charlie, went smoothly I went first and he paid promptly without and issues, great trader!



    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Quote Originally Posted by LeBron James View Post
    The "else if and &&" gives me an error :\
    Try the new one, and declare the class Player if it's not already.
    sweet
    Reply With Quote  
     

  6. #6  
    Registered Member
    LeBron James's Avatar
    Join Date
    Jan 2009
    Posts
    1,510
    Thanks given
    166
    Thanks received
    129
    Rep Power
    165
    Just did the tut and it worked! Thankyou so much for showing me this tut.



    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 24
    Last Post: 12-21-2011, 01:04 AM
  2. PI doors
    By badroots in forum Help
    Replies: 1
    Last Post: 10-01-2011, 09:21 PM
  3. opening doors and deleting doors on PI
    By Fearless in forum Help
    Replies: 2
    Last Post: 01-06-2011, 02:17 AM
  4. Replies: 1
    Last Post: 06-28-2010, 03:38 AM
  5. Replies: 1
    Last Post: 06-24-2010, 04:22 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •