Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Health Meter Fix
- @inputs Health MaxHealth
- @outputs Active Health MaxHealth
- #[
- Resolves the dupe issue with the CDE Health Meter
- Simply the health meter, spawn this chip, and link
- the chips outputs to what ever display you wish, dupe
- and save.
- ]#
- if (~Health || MaxHealth) {
- Health = Health
- MaxHealth = MaxHealth
- }
- elseif (clk("On")) {
- Active = 1
- }
- elseif (first() || dupefinished()) {
- foreach(I,E:entity=entity():getConstraints()) {
- if (E:type() == "utility_health_meter") {
- E:createWire(entity(),"Activate","Active")
- entity():createWire(E,"Health","Health")
- entity():createWire(E,"MaxHealth","Max Health")
- break
- }
- }
- Active = 0
- timer("On",1000)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement