dresnite/npcdialog

How can I send the form to the player?

SamuelPozzobon opened this issue · 8 comments

How can I send the form to the player?

This is EntityDamageByEntity event:

    if($npc instanceof Quake){
        $event->setCancelled(true);
            $form = new DialogForm("Quake");

            $form->addButton(new Button("Coming Soon", function(Player $player) {
                $player->sendMessage("Coming soon...");
            }));

            $form->setCloseListener(function(Player $player) {
                $player->sendMessage("You closed the form!");
            });
            $form->pairWithEntity($npc);
        }

When I hit the entity it doesn't show up the form

Hi! Try to right click (or hold an entity in the mobile edition) instead, the form should show up.

Ah I tried, it works but the entity is bugged on the form

Can you show me how it looks like?

Yeah, that's a client-side issue, it only happens with the Human entities for some reason.

Thanks for your time!