Type: Function
Overview
Describes the default behavior of artificial intelligence on collision with objects.
Examples
Change default ai functionality on collision with objects
local newAI = require('classes.SimpleAI').newAI -- enemy instance local enemy = newAI({group = mainGroup, img = "snailWalk1.png", x = halfW-50, y = display.contentHeight-500, ai_type = "patrol"}) -- change default ai functionality on collision with objects function enemy:defaultActionOnAiCollisionWithObjects(event) print("I caught you " .. event.other.type) -- will print debug text in output end