You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CryoEagle edited this page Jan 5, 2019
·
1 revision
instance_nearest
Return nearest GameObject
Syntax:
instance_furthest(position,obj,countMe)
Argument
Description
Vector2 position
Position from to start comparing distance
Type obj
Object for comparing
bool countMe
bool for counting this object too
Returns:GameObject
Description:
This function will find nearest object from given position, this code is usefull when programming basic game AI, AI will find nearest GameObject then move there and destroy that object.