Jump to content

Frog trying eat the boat


itzdarth

Recommended Posts

Hello, for two days I've been trying to figure out how to make a frog eat a boat, at first I thought and did it through NearestFrogAttackableGoal, but it only accepts LivingEntity, rewrote it for a regular Entity, but the frog simply refuses to eat the boat (setTongueTarget doesn't help either.)

Link to comment
Share on other sites

It's not possible without a rewrite of the entire Behavior system. Sensors used in `FrogAttackablesSensor` require a generic of at least a `LivingEntity` to set the `NEAREST_ATTACKABLE` entity. `StartAttacking` will only set the `ATTACK_TARGET` to be a `LivingEntity`. `ShootTongue` does allow it to be any `Entity`; however, the logic will only start if the target is on the `ATTACK_TARGET` memory.

To replicate anything similar, you would essentially need to rewrite the entire things as goals which have never been used in conjunction with Behaviors due to two systems colliding and confusing how the entity would behave. If you would like to attempt it though, you would need to add a `NearestAttackableTargetGoal` on the `targetSelector` and then some attack goal (e.g. `MeleeAttackGoal`) written for the frog on the `goalSelector`.

Link to comment
Share on other sites

1 hour ago, ChampionAsh5357 said:

Это невозможно без переписывания всей системы поведения. Датчики, используемые в `FrogAttackablesSensor`, требуют универсального по крайней мере `LivingEntity`, чтобы установить сущность `NEAREST_ATTACKABLE`. `StartAttacking` установит только `ATTACK_TARGET` как `LivingEntity`. `ShootTongue` позволяет быть любым `Entity`; однако логика запустится только в том случае, если цель находится в памяти `ATTACK_TARGET`.

Чтобы воспроизвести что-то подобное, вам, по сути, нужно было бы переписать все вещи как цели, которые никогда не использовались в сочетании с Поведениями из-за столкновения двух систем и путаницы в поведении сущности. Однако, если вы хотите попробовать это, вам нужно будет добавить `NearestAttackableTargetGoal` в `targetSelector`, а затем какую-нибудь цель атаки (например, `MeleeAttackGoal`), написанную для лягушки в `goalSelector`.

Got it, thanks for the tip.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.