Is there any possibility to check if at a specific map position is a specific effect for instance:
Code: Select all
game.level.map:addEffect(self,
self.x, self.y, duration,
DamageType.CRIMSON_FOG, {movementSpeed=speed,staminaBack=staminaBack, dur=1 },
radius,
5, nil,
engine.Entity.new{alpha=80, display='', color_br=200, color_bg=0, color_bb=0})
there are several functions which might do it but i can't figure out how to use them or if to use them in the first place:
I would like to end an effect on the char the moment he lefts the circle with the effect by using the_M:checkAllEntities (x, y, what, ...) Check all entities of the grid for a property until it finds one/returns one This will stop at the first entity with the given property (or if the property is a function, the return of the function that is not false/nil).
_M:checkAllEntitiesCount (x, y, what, ...) Check all entities of the grid for a property, counting the results This will iterate over all entities without stopping.
_M:checkAllEntitiesLayersNoStop (x, y, what, ...) Check all entities of the grid for a property This will iterate over all entities without stopping.
_M:checkAllEntitiesNoStop (x, y, what, ...) Check all entities of the grid for a property This will iterate over all entities without stopping.
_M:checkEntity (x, y, pos, what, ...) Check specified entity position of the grid for a property
_M:checkMapViewBounded ()
Code: Select all
class:bindHook("Actor:move", function(self, data)