1. 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

Removing attachments & getting owner of a block

Discussion in 'Modding Help' started by LightTab2, Nov 22, 2014.

  1. LightTab2

    LightTab2 Drill Rusher
    1. Zen Laboratories

    Messages:
    83
    1. There is a possibility to add attachments, but to remove?

    2. If I have a block, can I get the blob of player who built it?

    3. Is it possible to disable minimap?

    Thanks in advance.
     
    Last edited: Nov 22, 2014
  2. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    Scripts can add attachment points but currently cant delete them.

    Yes, if you're using the default placement scripts look at void PlaceBlob(CBlob@ this, CBlob @blob, Vec2f cursorPos) in BlobPlacement.as .
    Code:
    blob.set_u16("builder id", this.getPlayer().getNetworkID());
    
    /*
          Sets a u16 variable that is the builder players networkID on the block.
          You can then fetch the player from the blob at any time by using the following;
    
          CPlayer@ player = getPlayerByNetworkId(this.get_u16("builder id"));
          if (player is null) return;
    
          // do stuff
    
    */

    Yes, just add the following to the gamemode.cfg of the mode you want to remove minimaps from.
    Code:
    minimap = no
     
    LightTab2 likes this.
  3. LightTab2

    LightTab2 Drill Rusher
    1. Zen Laboratories

    Messages:
    83
    Thank you very much, your help saved a lot of my time, which I could spend on searching for functions, especially with placement.

    Would it be stupid if I set it to Vec2f(-100, -100)?
     
  4. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    You should join #kag.modding on irc, you will get faster answers there. Regarding your question, it depends on what you want to accomplish. If you could give me a clearer picture of the functionality you want I could give you a better answer.
     
  5. LightTab2

    LightTab2 Drill Rusher
    1. Zen Laboratories

    Messages:
    83
    Thank you again, I'll check out how's irc working.
     
    Last edited: Jan 11, 2015