Thread: Object moveplayer

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Object moveplayer 
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    How to add 2 moveplayers to a object? so away and back teleports for brimhaven dungeon a example:Screenshot by Lightshot


    Thanks!
    Owner of ThamenX
    Reply With Quote  
     

  2. #2  
    Donator
    Mr Extremez's Avatar
    Join Date
    Jun 2012
    Posts
    2,243
    Thanks given
    97
    Thanks received
    298
    Rep Power
    61
    Check the players coordinates, and teleport them based on where they are at.

    Code:
    If (x ==) {
    Do teleport
    } else {
    Do teleport
    }
    Add my new Skype: live:extremezgp

    Discord: Mr Extremez#3049

    Reply With Quote  
     

  3. #3  
    Registered Member Slatum.'s Avatar
    Join Date
    Apr 2017
    Posts
    125
    Thanks given
    23
    Thanks received
    13
    Rep Power
    16
    Are you talking about if the two players are in the same area?
    Reply With Quote  
     

  4. #4  
    Registered Member
    Alpi's Avatar
    Join Date
    Jun 2011
    Age
    28
    Posts
    1,191
    Thanks given
    212
    Thanks received
    285
    Rep Power
    148
    Quote Originally Posted by Mr Extremez View Post
    Check the players coordinates, and teleport them based on where they are at.

    Code:
    If (x ==) {
    Do teleport
    } else {
    Do teleport
    }
    This, except use the > or < operators and either check the x plane or y plane depending on the object rotation.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Slatum. View Post
    Are you talking about if the two players are in the same area?
    yh if you use a object you can take him over but i cannot be back over it, if you understand me.

    Quote Originally Posted by RiiPiiNFtW View Post
    This, except use the > or < operators and either check the x plane or y plane depending on the object rotation.
    can you make a example?
    Owner of ThamenX
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Apr 2017
    Posts
    301
    Thanks given
    34
    Thanks received
    59
    Rep Power
    65
    Code:
    case 1: //object id
    c.getPA().teleportPlayer(c.playerX == 3222 ? 1 : 0, 0);
    break;
    if the player's x is equal to 3222 (example) the player will move to tile 1 else moved to tile 0.
    That's a compact way to do it via ternary.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Alpi's Avatar
    Join Date
    Jun 2011
    Age
    28
    Posts
    1,191
    Thanks given
    212
    Thanks received
    285
    Rep Power
    148
    Quote Originally Posted by VenomRS View Post
    Code:
    case 1: //object id
    c.getPA().teleportPlayer(c.playerX == 3222 ? 1 : 0, 0);
    break;
    if the player's x is equal to 3222 (example) the player will move to tile 1 else moved to tile 0.
    That's a compact way to do it via ternary.
    You can do it like this too.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by VenomRS View Post
    Code:
    case 1: //object id
    c.getPA().teleportPlayer(c.playerX == 3222 ? 1 : 0, 0);
    break;
    if the player's x is equal to 3222 (example) the player will move to tile 1 else moved to tile 0.
    That's a compact way to do it via ternary.
    So this code will remember your old code and move back to that?
    Owner of ThamenX
    Reply With Quote  
     

  9. #9  
    Super Donator


    Join Date
    Feb 2011
    Age
    27
    Posts
    1,126
    Thanks given
    180
    Thanks received
    178
    Rep Power
    243
    Quote Originally Posted by blaxe View Post
    So this code will remember your old code and move back to that?
    Code:
    c.playerX == 3222 ? 1 : 0
    Is same thing as :
    Code:
    if (c.playerX == 3222)
    move to X tile 1
    else 
    move to X tile 0
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Gnakos View Post
    Code:
    c.playerX == 3222 ? 1 : 0
    Is same thing as :
    Code:
    if (c.playerX == 3222)
    move to X tile 1
    else 
    move to X tile 0
    What means 3222? xd
    Owner of ThamenX
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. All Lists - item, object and NPC
    By purepkownage in forum Configuration
    Replies: 8
    Last Post: 12-03-2007, 12:34 AM
  2. [TuT] Train Mage on an Object!! [TuT]
    By Numbers in forum Tutorials
    Replies: 6
    Last Post: 05-17-2007, 01:20 AM
  3. Making Objects Cases
    By sarah101 in forum Tutorials
    Replies: 6
    Last Post: 05-15-2007, 09:34 AM
  4. All Lists - item, object and NPC
    By purepkownage in forum Tools
    Replies: 2
    Last Post: 05-11-2007, 09:46 AM
  5. Making Object Doing Sumtin.
    By Santa Noobie in forum Tutorials
    Replies: 0
    Last Post: 05-06-2007, 06:33 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
  •