Temporary cell events are purely event-system based. When adding them to a cell, you can set them up to automatically be removed after a defined number of turns or time (in seconds), or keep them on cells until they're manually removed (via events).
If you want to use temporary cell events for this, you could add them at the end of a combatant's grid move event and remove them again at the start of it.
Alternatively, you can use a system like in the Mission Grid Battles project, see the Attack of opportunity.
Basically, you can do all that in the grid move events, either via the temporary cell events or directly checking if a cell is within attack range (or use range of an ability) of an enemy.