About: Day and night lamp posts   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Day and night lamp posts

AttributesValues
rdfs:label
  • Day and night lamp posts
rdfs:comment
  • Day and night lamp posts
  • This day and night lamp posts script turns the lamp posts in an area on at night and off during the day. Place this script in the OnHeartbeat event of an object in the area, and give all the lamp posts a tag of "LampPost". // Script to turn lamps on at night and off during the day. const string TAG_LAMP = "LampPost"; const string LV_LAMPS_ON = "LampsOn"; void main() {}
dcterms:subject
abstract
  • Day and night lamp posts
  • This day and night lamp posts script turns the lamp posts in an area on at night and off during the day. Place this script in the OnHeartbeat event of an object in the area, and give all the lamp posts a tag of "LampPost". // Script to turn lamps on at night and off during the day. const string TAG_LAMP = "LampPost"; const string LV_LAMPS_ON = "LampsOn"; void main() {// define data storage object object oData = OBJECT_SELF; int bLampsAreOn = GetLocalInt(oData, LV_LAMPS_ON); int bLampsShouldBeOn = GetIsDusk() || GetIsNight() || GetIsDawn(); if ( bLampsAreOn != bLampsShouldBeOn ) { // Loop through all lamps in the area. int nNth = 0; object oLamp = GetNearestObjectByTag(TAG_LAMP, oData, nNth); while ( oLamp != OBJECT_INVALID ) { // Turn this lamp on or off as appropriate. AssignCommand(oLamp, PlayAnimation( bLampsShouldBeOn ? ANIMATION_PLACEABLE_ACTIVATE : ANIMATION_PLACEABLE_DEACTIVATE)); SetPlaceableIllumination(oLamp, bLampsShouldBeOn); // Advance to the next lamp. oLamp = GetNearestObjectByTag(TAG_LAMP, oData, ++nNth); } // Update the area. RecomputeStaticLighting(GetArea(oData)); // Track this. SetLocalInt(oData, LV_LAMPS_ON, bLampsShouldBeOn); } }
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software