Is there a way to check if theres a monster at (x, y) using @eval()?
It would be something like $::field->isWalkable($x, $y), but for monsters instead of blocks.
Check if there's a monster on given coordinates
Moderators: Moderators, Documentation Writers
-
- Noob
- Posts: 2
- Joined: 07 Feb 2011, 20:56
- Noob?: No
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: Check if there's a monster on given coordinates
Something like
Code: Select all
List::MoreUtils::any { $_->{pos}{x} == $x && $_->{pos}{y} == $y } @{$monstersList->getItems}