Give an item temperature

Pilus edited this page Aug 11, 2015 · 1 revision

The following guide describes how you can create an advanced item with a Temperature. This item is set to give a temperature for a zone the player is in.

Start out with the advanced item you want to give a Temperature, or convert a simple item into an advanced.

'''Note:''' This guide requires GHI v.2.0.8 or newer

{| |'''Step 1 - The Temperature'''

In your advanced item click the port in Dynamic Actions area (with the red arrow) and goto location > Temperature, for this we will label the output as currentTemp

|File:TempDemo1.png‎ |- |'''Step 2 - Display the Temperature:Tooltip'''

Now from our dynamic action page, hit next again to goto the item attribute page, now what we are going to do is click Add Tooltip, for the name set it as TempTT (short for Temperature Tool Tip!). Click the box with the red arrow pointing at it,as before, location and temperature(it will remember our previous value if not be sure to put in currentTemp) |File:TempDemo2.png‎ |- |Now we click the box to the right of this and click, set tool tip line.

  • Text 1 should be Current temperature.
  • For text 2 click the tab underneath the editbox that says var and set it to currentTemp

(note all temperatures are in Celsius)

|File:TempDemo3.png‎ |- |'''Step 3 - Display Temperature:Message''' Now, as a last step, you can display the temperature in a message, for this we will go back a page (or if you have already clicked finish on the item, Edit it then click next once.) you will be back to our dynamic action page, click the box to the left of the our temperature action,this time goto other > Message. set the color to your liking the message to the vartab then enter currentTemp then set the output to 2. As a note you can reference the currentTemp Variable in scripts. |File:TempDemo4.png‎ |}

Your item is now done and you can add other things to it as you wish.

Item Example Code

Below is import code for an example windchime..that dosen't really tell you the wind, but the temperature!


Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.