Du musst natürlich auch GetCurrentHealth verwenden um den Wert zu speichern. Probier das mal: Code: scn aaarmorbrokenc short init short next short EquipDelay long objecthealth ref Actor Begin onEquip if init == 0 set Actor to getcontainer set init to 1 endif end Begin GameMode if init == 1 if getCurrentHealth / getObjectHealth >= 0 && getCurrentHealth / getObjectHealth <= 0.75 message "Rüstung ist beschädigt!" set next to 1 set objecthealth to getCurrentHealth Actor.addItem aamodiamelionbroken 1 set init to 0 ;Abfrage war sinnlos (immer wahr), daher entfernt set EquipDelay to 1 endif elseif next == 1 if EquipDelay >= 1 set EquipDelay to EquipDelay - 1 elseif EquipDelay == 0 set next to 0 Actor.UnEquipItem aamodiamelion Actor.EquipItem aamodiamelionbroken Actor.setEquippedCurrentHealth objecthealth 2 removeMe endif endif end
scn aaarmorbrokenc short init short next short EquipDelay long objecthealth ref Actor Begin onEquip if init == 0 set Actor to getcontainer set init to 1 endif end Begin GameMode if init == 1 if getCurrentHealth / getObjectHealth >= 0 && getCurrentHealth / getObjectHealth <= 0.75 message "Rüstung ist beschädigt!" set next to 1 set objecthealth to getCurrentHealth Actor.addItem aamodiamelionbroken 1 set init to 0 ;Abfrage war sinnlos (immer wahr), daher entfernt set EquipDelay to 1 endif elseif next == 1 if EquipDelay >= 1 set EquipDelay to EquipDelay - 1 elseif EquipDelay == 0 set next to 0 Actor.UnEquipItem aamodiamelion Actor.EquipItem aamodiamelionbroken Actor.setEquippedCurrentHealth objecthealth 2 removeMe endif endif end
-- Ich kam, sah, und konnte meinen Augen nicht trauen
Foren-Regeln