HyperScript
Docs

← All of the Docs HyperModels

Furniture put down, broken and taken away HyperModels

structureon model furniture place "<id>":HyperModels

Runs when a player puts that piece of furniture down. {_model} is its id and {_location} where it stands. Without an id it runs for every piece

on model furniture place "furniture:throne":
    broadcast "&6%player.name% has set up a throne."
    set {throne.place} to {_location}
structureon model furniture break "<id>":HyperModels

Runs when a player breaks one, with the same values

on model furniture break "furniture:throne":
    broadcast "&7The throne is gone."
    delete {throne.place}
effectremove model furniture at <location>HyperModels

Take away the piece of furniture that stands there, without dropping it. Nothing happens where there is none

remove model furniture at {throne.place}
Guide and examples
on model furniture place "furniture:throne":
    broadcast "&6%player.name% has set up a throne."
    set {throne.place} to {_location}

on model furniture break "furniture:throne":
    broadcast "&7The throne is gone."
    delete {throne.place}

on model furniture place:
    add 1 to {%player%.furniture_placed}

command /clearthrone:
    permission: "models.admin"
    trigger:
        if {throne.place} is set:
            remove model furniture at {throne.place}
            delete {throne.place}
SyntaxEffect
on model furniture place "<id>":Runs when a player puts that piece of furniture down. {_model} is its id and {_location} where it stands. Without an id it runs for every piece
on model furniture break "<id>":Runs when a player breaks one, with the same values
remove model furniture at <location>Take away the piece of furniture that stands there, without dropping it. Nothing happens where there is none
  • These need a version of ItemsAdder, Oraxen or Nexo that says when furniture is put down and broken, and lets it be removed; with one that does not, the blocks never run and the line does nothing.