idTarget_Count
An entity that is commonly used for relays.
As with most computing logic, relays wait for specified inputs before it can send its output.
Usage
entity {
entityDef example_relay {
inherit = "target/relay";
class = "idTarget_Count";
expandInheritance = false;
poolCount = 0;
poolGranularity = 2;
networkReplicated = false;
disableAIPooling = false;
edit = {
flags = {
noFlood = true;
}
networkSerializeTransforms = false;
spawnPosition = { // Spawn position does not matter
x = 1;
y = 1;
z = 1;
}
targets = { // Entities that activate once the relay outputs
num = 1;
item[0] = "example_entity";
}
repeat = true; // If the relay is repeatable
count = 1; // How many inputs this relay needs to output
delay = 1; // Activation delay in seconds
}
}
}
Relays are useful if you want to activate several entities at once, give a delay before the entities activate, or have an entity require multiple inputs before activating.
No Comments