- Joined
- Jun 21, 2015
- Messages
- 45
- Reaction score
- 11
I tried to build a dual power-supply "turret" yesterday, and quickly realized that it simply doesn't work (as expected/desired) when the lag kicks in, which is like all-the-time if you are on a popular server.
My suggestion, as an alternative, is to stop using "timing" to "assume" system states, and instead just plain measure the system state with a "meter block". That way, it would not mater how long it takes before your weapon cools down, or you power tank refill, ... You just wait until you know you reached the desired state, and then you activate your logic (or the other way around, using a NOT block).
The "meter block" would be configurable by a number, 0% to 99%, and would activate if the measured state is over that percentage. The "measured state" would be determined by making the meter block a slave of a block representing the desired system state.
In some cases, the measured value is "boolean", like "enemy presence" (0% or 100%), but that's OK. Maybe in some case it would be good to have a "absolute value", but in most cases, a relative value is better, because you can add more shield capacitors, and your logic will still work, or even still work if capacitors are reduced due to enemy damage!
Here a list possible system states, and which block would represent them:
My suggestion, as an alternative, is to stop using "timing" to "assume" system states, and instead just plain measure the system state with a "meter block". That way, it would not mater how long it takes before your weapon cools down, or you power tank refill, ... You just wait until you know you reached the desired state, and then you activate your logic (or the other way around, using a NOT block).
The "meter block" would be configurable by a number, 0% to 99%, and would activate if the measured state is over that percentage. The "measured state" would be determined by making the meter block a slave of a block representing the desired system state.
In some cases, the measured value is "boolean", like "enemy presence" (0% or 100%), but that's OK. Maybe in some case it would be good to have a "absolute value", but in most cases, a relative value is better, because you can add more shield capacitors, and your logic will still work, or even still work if capacitors are reduced due to enemy damage!
Here a list possible system states, and which block would represent them:
- Shield => Shield Capacitor (Activate Shield Supply Beam(Full)/Sound Alarm(Not Full Anymore))
- Power => Power Tank (Activate Power Supply Beam/Weapon)
- Storage Capacity => Storage (Stop salvaging!)
- Weapon/Tool Cool-Down => Weapon/Tool Computer (Fire when ready)
- Enemy Presence => Scanner Computer (Sound alarm/Launch Drones/Deploy Turrets)
- Speed => Thruster, uses Thruster alignment (React to full-stop?)
- Cloaking => Cloaking fails randomly under Lag (Reactivate Cloaking automatically)
- Armor HP => Any Armor Block (Activate evasive maneuver/retreat automatically for drones?)
- System HP => Core (Activate evasive maneuver/retreat automatically for drones?)