Thread: [PI] need help with Objectmanager

Results 1 to 5 of 5
  1. #1 [PI] need help with Objectmanager 
    Registered Member
    Join Date
    Aug 2014
    Posts
    10
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    So I am using the Project Insanity base, and am learning to code this way by mostly finding out stuff myself. I thought I had found a way to remove existing objects and place new once (banks for example)(I also know this is probably the easiest thing ever for most of you). However when I placed my banks on a higher floor in a building it worked in the beginning, but once I logged out and back in on another floor the objects basically changed with me. here is what I used: 2213 being the bank ID.

    c.getPA().checkObjectSpawn(2213, 2667, 3432, 2, 10);
    c.getPA().checkObjectSpawn(2213, 2668, 3432, 2, 10);
    c.getPA().checkObjectSpawn(2213, 2669, 3432, 2, 10);

    I don't quite know what the 2 and the 10 mean, although I think the 2 turns them around. So for example 1 faces north, 2 east, 3 south and 4 west.. My guess.
    The same happened when I removed existing objects, except this time the removed object spawned back when I logged on at a different floor/hight.

    c.getPA().checkObjectSpawn(-1, 2674, 3419, 1, 10);

    Thanks for your help in advance.

    edit: this is the entire thing, I am sure I need to do something with the c.heigthLevel. Would love to get some help with that.

    private int[][] customObjects = {{}};
    public void loadCustomSpawns(Client c) {
    c.getPA().checkObjectSpawn(6163, 3083, 3488, 1, 10);
    c.getPA().checkObjectSpawn(6165, 3083, 3490, 1, 10);
    c.getPA().checkObjectSpawn(6166, 3083, 3492, 1, 10);
    c.getPA().checkObjectSpawn(6164, 3083, 3494, 1, 10);
    c.getPA().checkObjectSpawn(6162, 3083, 3496, 1, 10);
    c.getPA().checkObjectSpawn(1596, 3008, 3850, 1, 0);
    c.getPA().checkObjectSpawn(1596, 3008, 3849, -1, 0);
    c.getPA().checkObjectSpawn(1596, 3040, 10307, -1, 0);
    c.getPA().checkObjectSpawn(1596, 3040, 10308, 1, 0);
    c.getPA().checkObjectSpawn(1596, 3022, 10311, -1, 0);
    c.getPA().checkObjectSpawn(1596, 3022, 10312, 1, 0);
    c.getPA().checkObjectSpawn(1596, 3044, 10341, -1, 0);
    c.getPA().checkObjectSpawn(1596, 3044, 10342, 1, 0);
    c.getPA().checkObjectSpawn(6552, 3094, 3506, 2, 10);
    c.getPA().checkObjectSpawn(409, 3091, 3506, 2, 10);
    c.getPA().checkObjectSpawn(2213, 3047, 9779, 1, 10);
    c.getPA().checkObjectSpawn(2213, 3080, 9502, 1, 10);
    c.getPA().checkObjectSpawn(2213, 2667, 3432, 2, 10);
    c.getPA().checkObjectSpawn(2213, 2668, 3432, 2, 10);
    c.getPA().checkObjectSpawn(2213, 2669, 3432, 2, 10);
    if (c.heightLevel == 0)
    c.getPA().checkObjectSpawn(2492, 2911, 3614, 1, 10);
    else
    c.getPA().checkObjectSpawn(-1, 2911, 3614, 1, 10);
    c.getPA().checkObjectSpawn(-1, 2674, 3419, 1, 10);

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    محمد

    Jamili's Avatar
    Join Date
    Jun 2010
    Posts
    408
    Thanks given
    93
    Thanks received
    246
    Rep Power
    307
    Go and find checkObjectSpawn() in PlayerAssistant.java

    See what is inside the parameters --> checkObjectSpawn(..here..).

    I'm assuming your 10 is the height and 2 is the direction.

    I could not understand your issue here
    However when I placed my banks on a higher floor in a building it worked in the beginning, but once I logged out and back in on another floor the objects basically changed with me. here is what I used: 2213 being the bank ID.
    The objects changed with you? What does that mean?

    edit: I opened the images and noticed this is a very basic Project Insanity so I assume you've recently started your journey. I do NOT recommend using Project Insanity. It is old, outdated (released in 2010, that's 9 fucking years old), the codes written are absolutely horrible. As you're just starting, it's easier to adjust to a different base. Don't fall into the trap of using Project Insanity.
    [Only registered and activated users can see links. ]
    Spoiler for Honorable mentions:

    Quote Originally Posted by JRFisher View Post
    Dude, learn yourself, it took me 17 months of continuous research to learn how to import a project.
    Quote Originally Posted by Pollution View Post
    When? And Idiot, I'm using a oldschool, it's not easy to get the command for an oldschool, retard c u.
    Quote Originally Posted by Waj_Assif View Post
    I sayin u dont contribute never aall u do is finna tryin attack ppl and always finna start fights .......
    Quote Originally Posted by Kris View Post
    You must be one of those slower breeds.
    Quote Originally Posted by Gandalf View Post
    Just piss off ploter hacker fella dumb fuck. Your a donor to a rsps community, I'm a Mainowner to a Private Server thats 7+ Years old. Lmfao kid, get a life. Don't let my name come out of your mouth again. Or it wont end nicely for you. Understand me big boy?
    Quote Originally Posted by Tojad View Post
    What do you know about Public Void and int without this [] is only 1 integer, why?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2018
    Posts
    35
    Thanks given
    13
    Thanks received
    12
    Rep Power
    12
    The 2 represents the Face(Direction) as the above person has stated.
    The 10 represents the Type(Still have no idea what that actually does).

    Also as stated by above, I wouldn't suggest using an old PI base to learn.
    Reply With Quote  
     

  4. #4  
    A
    A is offline
    Registered Member A's Avatar
    Join Date
    May 2019
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I see that you're new to programming RSPS's (just assuming).
    Here is a answer to your question.

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Extreme Donator

    Patrity's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    731
    Thanks given
    36
    Thanks received
    110
    Rep Power
    111
    When possible always load objects from the cache (map)
    If you cant/dont want to edit the map, load it from the client.

    Only load objects server side when absolutely necessary.

    Quote Originally Posted by Sado View Post
    The 2 represents the Face(Direction) as the above person has stated.
    The 10 represents the Type(Still have no idea what that actually does).

    Also as stated by above, I wouldn't suggest using an old PI base to learn.
    Type designates different attributes of the objects.
    Type 1 is walls for example. Each side of the object is walkable but the face is not.
    Type 22 are ground decorations, it is completely walkable.
    Type 10 are your basic objects, not walkable and usually have interactions.
    Type 11 is the same as type 10 but the objects are on a 45 degree offset.
    Free map releases: [Only registered and activated users can see links. ]


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. Thankful user:



Thread Information
Users Browsing this Thread

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

Similar Threads

  1. [PI] Need help with a few things.
    By Alexander in forum Help
    Replies: 2
    Last Post: 09-23-2010, 07:59 PM
  2. [PI] Need help with adding models
    By Debugger in forum Help
    Replies: 3
    Last Post: 09-18-2010, 04:59 AM
  3. [PI] Need help with Highscores![/PI] REP++!
    By Alexander in forum Help
    Replies: 4
    Last Post: 07-13-2010, 04:53 AM
  4. Replies: 1
    Last Post: 07-11-2010, 12:26 AM
  5. Replies: 0
    Last Post: 06-26-2010, 02:09 PM
Tags for this Thread

View Tag Cloud

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