| Blockland Forums > Help |
| Help with events? |
| (1/2) > >> |
| austin0331:
How do I make it so if I click say... a remote control once, the TV turns on, and if I click it again, it goes off? What events do I put in to do so? Appreciated if helped :cookieMonster: |
| Chrono:
List of events to turn TV on List of events to turn TV off, with events all disabled (unchecked) OnActivate self toggleEventEnabled (List all event numbers except this one) |
| austin0331:
--- Quote from: Chrono on October 09, 2009, 05:42:09 PM ----snip- --- End quote --- wut? |
| Chrono:
Let's say you had a lightbulb with a nomal red brick to turn it off and on (without anything JVS) List of events to turn light on would be Event turned on: 0 [0] onActivate <NAMEDBRICK> lightbulb setLight somelighthere List of events to turn lightbulb off would be Event turned off: 1 [0] onActivate <NAMEDBRICK> lightbulb setLight NONE then Event turned on: 2 [0] onActivate Self ToggleEventEnabled 0 1 Which would look like this: onActivate lightbulb setLight Somelighthere <this is event number 0, and it should be checked because it turns the light on. onActivate lightbulb setLight NONE <this is event number 1, and it should be turned off because it turns the light off. onActivate Self toggleEventEnabled 0 1 <this is the toggle event, since we're using events from 0-1 we list the individual numbers from 0 to 1. ToggleEventEnabled turns off events that are on, and turns on events that are off. |
| Chrono:
Let's say you had a lightbulb with a nomal red brick to turn it off and on (without anything JVS) List of events to turn light on would be Event turned on: 0 [ 0 ] onActivate <NAMEDBRICK> lightbulb setLight somelighthere List of events to turn lightbulb off would be Event turned off: 1 [ 0 ] onActivate <NAMEDBRICK> lightbulb setLight NONE then Event turned on: 2 [ 0 ] onActivate Self ToggleEventEnabled 0 1 Which would look like this: onActivate lightbulb setLight Somelighthere <this is event number 0, and it should be checked because it turns the light on. onActivate lightbulb setLight NONE <this is event number 1, and it should be turned off because it turns the light off. onActivate Self toggleEventEnabled 0 1 <this is the toggle event, since we're using events from 0-1 we list the individual numbers from 0 to 1. ToggleEventEnabled turns off events that are on, and turns on events that are off. Ugh stupid bullet tags. |
| Navigation |
| Message Index |
| Next page |