Object.type
Type: String
Default value: "enemy"
Overview

Object type. Type is necessary to distinguish AI objects from other objects. Any type other than "enemy" will not be agressive to the object with type "player".
Examples

Change AI object type from enemy to friend AI
local newAI = require('classes.SimpleAI').newAI
-- friend instance
local friend = newAI({group = mainGroup, img = "snailWalk1.png", x = halfW-50, y = display.contentHeight-500, ai_type = "guard"}) 
friend.type = "friend" -- now object type is "friend" and object will not chase an object with type "player"