[ACE] Species for event names

I plan to make a conditional branch with a script. This requires an event name. I used 64-pixel sprites to keep NPCs one block away from the player.

I changed the event name to <Centaur> or <Sprite Type: Centaur>

Here's what I used:
$game_player.moving? && distance_player_event_id?(5) && /<sprite type: centaur>/i

The sprite type is what I called it. Yet species is more specific in this case. The distance script below is credited to kyonides.


class Game_Interpreter
def distance_player_event_id?(event_id)
event = $game_map.events[event_id]
return unless event
dist_x = ($game_player.x - event.x).abs
dist_y = ($game_player.y - event.y).abs
dist_x + dist_y < 5 # Change the number at will.
end
end


Here's what I suggest a custom list of event names below, after 'Species':
Species =
Human
Elf
Dwarf
Slime
Centaur
Lamia

Below these, will be a script to make.
Just for checking if the event is a centaur or a moose or a penguin:

Ruby:
class Game_Event
  def centaur?
    @event.name[/centaur/i]
  end

  def moose?
    @event.name[/moose/i]
  end

 def penguin?
    @event.name[/penguin/i]
  end
end

Examples:
Ruby:
$game_map.events[5].centaur?
$game_map.events[5].moose?
$game_map.events[5].penguin?

If you follow the same pattern over and over again, you can add as many animals, drones, robots, insects and the like.
Thanks! Let's take this another step.

Look for a highlight and a red oval.
Event Name.png


Example:
Ruby:
$game_map.events[id].human?

It could be any event id as long you add <species> in the name.
Well, you don't really need the species tag at all if you're looking for a specific race as the examples have shown you on my previous post. Just create one more method following the same pattern I used 3 times already. And yeah, instead of id you're expected to enter any specific game event ID number.
I'm using a conditional branch. Things like $game_map.events[1].human?, $game_map.events[2].human?, $game_map.events[3].human? in one event takes too much space. I planned on adding 20 events or more based on my previous post. One condition per race.

I used Victor's Pixel Movement script.

Pixel Movement.

Check in the spoilers for a conditional branch script. It's very long. I don't know the character limit.

Conditional Branch: Script:
Spoiler: Conditional Branch Script
$game_player.x == $game_map.events[id].x-0.125 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x-0.250 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x-0.375 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x-0.500 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x-0.625 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x-0.750 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x-0.875 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x-1 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+0.125 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+0.250 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+0.375 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+0.500 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+0.625 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+0.750 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+0.875 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human? || $game_player.x == $game_map.events[id].x+1 && $game_player.y-1 == $game_map.events[id].y && $game_map.events[id].human?

I still prefer any id than a specific number.

Original thread: https://forums.rpgmakerweb.com/threads/ace-species-for-event-names.166600/