|
141 | 141 | ]
|
142 | 142 |
|
143 | 143 |
|
| 144 | +// A multisource that can be enabled/disabled explicitly by triggering <TARGETNAME>_on and <TARGETNAME>_off respectively. |
| 145 | +// NOTE: This template contains an invisible button_target. While it doesn't block the players movement, it can be triggered by explosions, |
| 146 | +// so it's best to put this entity in a separate 'entity-only' area. |
| 147 | +// |
| 148 | +// @MESS REWRITE: |
| 149 | +// "classname": "macro_insert" |
| 150 | +// "template_map": "{dir()}\mess_multisource.rmf" |
| 151 | +// @MESS; |
| 152 | +@PointClass color(255 127 0) = mess_multisource : "Multisource that can be enabled/disabled explicitly" |
| 153 | +[ |
| 154 | + targetname(target_source) : "Multisource name" |
| 155 | + target(target_destination) : "Multisource target" |
| 156 | + globalstate(string) : "Global state master" |
| 157 | + |
| 158 | + spawnflags(flags) = |
| 159 | + [ |
| 160 | + 1 : "Starts on" : 0 |
| 161 | + ] |
| 162 | +] |
| 163 | + |
| 164 | +// A multisource (or pair of multisources) that relies on a game_counter. |
| 165 | +// Can produce both a multisource that is enabled when the counter is above zero, and a multisource that is enabled when the counter is at or below zero. |
| 166 | +// Trigger <TARGETNAME>_inc and <TARGETNAME>_dec to adjust the counter value. |
| 167 | +// NOTE: This template contains an invisible button_target. While it doesn't block the players movement, it can be triggered by explosions, |
| 168 | +// so it's best to put this entity in a separate 'entity-only' area. |
| 169 | +// |
| 170 | +// @MESS REWRITE: |
| 171 | +// "classname": "macro_insert" |
| 172 | +// "template_map": "{dir()}\mess_counter_multisource.rmf" |
| 173 | +// @MESS; |
| 174 | +@PointClass color(255 127 0) = mess_counter_multisource : "Pair of multisources that depend on a counter" |
| 175 | +[ |
| 176 | + targetname(target_source) : "1st multisource name (counter > 0)" |
| 177 | + target(target_destination) : "1st multisource target" |
| 178 | + globalstate(string) : "1st global state master" |
| 179 | + |
| 180 | + // Use this to |
| 181 | + neg_targetname(target_source) : "2nd multisource name (counter <= 0)" |
| 182 | + neg_target(target_destination) : "2nd multisource target" |
| 183 | + neg_globalstate(string) : "2nd global state master" |
| 184 | + |
| 185 | + // The multisource will initially be enabled if this is more than 0: |
| 186 | + initial_value(integer) : "Initial counter value" : 0 |
| 187 | +] |
| 188 | + |
| 189 | + |
144 | 190 | // --------------------------------------------------------------------------------
|
145 | 191 | // Rathunt map entities:
|
146 | 192 | // --------------------------------------------------------------------------------
|
|
0 commit comments