Skip to content
Discussion options

You must be logged in to vote

I second this answer. Since properties should only change when a turn begins or ends, you should only need to check them once per turn, and a turnscript works nicely for that.

new Cmd("contemplate", {
  regex: new RegExp("^contemplate (.+)$"),
  attName: "contemplate",
  objects: [
    { scope: parser.isHere },
  ],
  defmsg: "{pv:item:'be:true} not something you can do that with.",
})

createItem("arbitrary_value", {
  loc:"lounge",
  examine:"It makes your head hurt when you look at it.",
  oldVal:5,
  val:5,
  hereVerbs: ["Contemplate"],
  eventActive:true,
  eventPeriod:1,
  eventScript: function() {
    if (this.val !== this.oldVal) {
      msg(`The value has changed to ${this.val}`)…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cellarderecho
Comment options

Answer selected by GhostOfMoria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants