Code:
Problem description:
Hi, i want to somehow force call Entered() on object, i overlap(relocate from loc=null) my player. I mean about moment after respawn mob.
This is very simple mechanic, mob has own aiTrigger. When player cross trigger mob get information to target mob etc.
https://puu.sh/IH3Aa.mp4
Feb 4 2022, 2:02 pm
|
|
You can call src.Entered() manually and pass in the arguments as needed.
|
Oh I see.... I change my mind.. my main problem is how I can check if someone (mob) is overlapping some object? I don't want to check if mob is in locs contents..\(o)/
|
Going with what Kozuma suggested you can also.. Use Crossed() which is ran when two objects through Move() "cross" over one another.
Crossed is called on the mob whom is not the originator of Move() BTW |
You don't want to be manually calling Crossed(), Entered() or any other of the movement procs. They are there to override and insert your custom behaviours.
If you want to check to see if two objects are overlapping, you want to do so by checking for object a in object b's bounding box, which is done with bounds() and obounds() as kozuma said. if(a in bounds(b)) |