Some basic question

Hi, I curently using the tanfy keyboard to common event.
I want to put some conditional brench and need help with it.

Conditional brench condition I need:

- Check if an event was in front of the player.
- Check if an event was in front of the player with a specific name.
- Check if an event was in front of the player with a specific comment.
- Check if the case in front of the player have a specific tag.
- Check if the case in front of the player have a specific regionID.

Thanks for your help.
You can make out of this data what you will, like if(name === "soAndSo") doStuff();
PHP:
var direction = $gamePlayer._direction; var x1 = $gamePlayer._x; var y1 = $gamePlayer._y;
var x2 = $gameMap.roundXWithDirection(x1, direction); var y2 = $gameMap.roundYWithDirection(y1, direction);
var event = $gameMap.eventsXy(x2, y2)[0];
var name = $dataMap.events[event._eventId].name;
var meta = $dataMap.events[event._eventId].meta.mytag1 !== undefined ?
  $dataMap.events[event._eventId].meta.mytag1 : false;
$gameMessage.add(
  "Hello. In front of the player we have " + name + " of ID #" + event._eventId + "\n" +
  "and my meta <mytag1> is " + meta + " yepper!"
);
Screen%20Shot%202017-03-11%20at%209.43.46%20PM.png

Original thread: https://forums.rpgmakerweb.com/threads/some-basic-question.75704/