Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Before executing code below: get a creep you own
- // Using FIND_* constants
- // Returns nothing (to be exactly, it returns null and says hai twice)
- Game.creeps[Object.keys(Game.creeps)[0]].pos.findClosest(FIND_MY_CREEPS, {filter: function(e) {console.log('hai'); return false;}});
- // Using custom objects
- // Returns the creep object and doesn't even say hai!
- Game.creeps[Object.keys(Game.creeps)[0]].pos.findClosest([Game.creeps[Object.keys(Game.creeps)[0]]], {filter: function(e) {console.log('hai'); return false;}});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement