1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Find blob

Discussion in 'Modding Help' started by GoldenGuy, Mar 30, 2017.

  1. GoldenGuy

    GoldenGuy Haxor Tester

    Messages:
    105
    Im making piston mod, wich can move blobs now, im using map.getBlobInPosition (dont remember how its calld) to find blobs and it works fine, but not for spiker, it returns spike, not spiker. How do i find spiker if i have its spike?
     
  2. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    For the Spiker you can find the parent blob of a Spike via the AttachmentPoint handle.
     
  3. GoldenGuy

    GoldenGuy Haxor Tester

    Messages:
    105
    what command this is? getOccupied()?
     
  4. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    I'm currently away from my computer so I can't say for certain, but inside Spiker.as I fetch both sides of the attachments. I implore you to take a look until I can get back.
     
    Verrazano likes this.
  5. GoldenGuy

    GoldenGuy Haxor Tester

    Messages:
    105
    I tryed same as in spiker, but isOccuped() give me null, because spike connected to spiker, not oposite ::(:
     
  6. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    Code:
    // blob = spike
    // mechanism = spiker
    
    CBlob@ mechanism = blob.getAttachments().getAttachedBlob("MECHANISM", 0);
    if(mechanism is null)
    {
        return;
    }
    
    // perform actions on mechanism
     
    GoldenGuy likes this.
  7. GoldenGuy

    GoldenGuy Haxor Tester

    Messages:
    105
    Ohhhhh, i need to add 0 at the end! Thaank you! :)