Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* I'm trying to grab the 3 EntityWP (Entity Weak Points), then select their canTakeDmg property to either true or false. Debugger throws this error: Cannot set property 'canTakeDmg' of undefined */
- checkWPDmg: function () {
- var EntityWP = ig.game.getEntitiesByType(EntityWeakPoint);
- for (var i = 0; i < EntityWP.length; i++); {
- if (this.bWPExposed === true) {
- EntityWP[i].canTakeDmg = true;
- } else {
- EntityWP[i].canTakeDmg = false;
- }
- }
- },
RAW Paste Data