There are 3 detection types in Action Combat plugin. Cone, Circular, and Sound Detection.
Demonstration |
Simply use conditional branch:
Case left: checkRange(this._eventId, 8, 'player', 180)
This makes the event have a detection system using a cone with a length of 8 and a size of 180.
Case right: checkRange(this._eventId, 3, 'player')
This makes the event have a detection system using a circular with 3 tiles.
Now what if you want it to be a bit more realistic by having something to block enemies' vision?
Safe zones |
Case left: checkRange(this._eventId, 8, 'player', 180, 1)
The last parameter will be a region Id that will block enemies' vision.
Case right: checkRange(this._eventId, 3, 'player', 0, 1)
For this case, the cone parameter has to be 0 if you want to use circular detection.
For sound detection, please watch the video below.
The conditional branch for sound detection:
checkSound(this._eventId, 50, 5)
This means the current event, within 5 tiles, will check for any sound that has column >=50 coming from any event nearby.