1. Hello,

    Need some help with this lua code :
    (Seen in the Structures hooks documentation)

    Code:
    function PLUGIN:OnStructureRepair(block, player)
        print("OnStructureRepair works!")
    end
    Have question about the block parameter. I think in the game all structure (like wall, foundation) must have a unique identifier.
    Is it possible to get this unique ID with something like

    Code:
    function PLUGIN:OnStructureRepair(block, player)
        print("OnStructureRepair works!")
        ID = block.blockIdentifier
    end
    If yes how ?
     
  2. Calytic

    Calytic Community Admin Community Mod

    Code:
    block.prefabID
    block.name
     
  3. Thanks, but that not what I was looking for.

    If I repair on wall, I want the ID of this wall. And if I repair another wall, I want another ID.
    I want to discern walls by them ID.
     
  4. block.net.ID ?
     
  5. Thanks a lot nivex !

    Code:
    function PLUGIN:OnStructureRepair(block, player)
        print("OnStructureRepair works!")
        ID = block.net.ID
    end
    That was exactly what I was looking for !
    Perfect !