antiblock
https://arwen2.global/
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
StarKiller

Como dar "despawn" num NPC

Question

Boas cyber,

 

Tenho uma quest, na qual eu faço com que seja gerado um NPC quando um MOB morre, mas queria que passado 1 minuto o NPC desaparecesse... Se alguém me pudesse ajudar agradecia muito :)

PS* o timmer está para 5 segundos mas é por questões de teste, e a mensagem Hi!, serve apenas para, dentro do jogo, eu ter anoção de que o timer já passou ou não.

 

Quest:

 

quest portal_to_forest begin
    state start begin
        when XXX.kill begin
            local x = (pc.get_local_x())
            local y = (pc.get_local_y())
            mob.spawn(XXXXX , x , y , 1)
            timer("timecount" , 5)
        end
        when timecount.timer begin
            npc.kill()
            notice_all("Hi!")
        end

 

** TAMBÉM JÁ TENTEI: **


        when spawn.timer begin
            npc.purge(XXXXX)
            notice_all("Hi!")
        end
    end
end

 

*************************

 

        when spawn.timer begin
            npc.purge(XXXXX , x , y , 1)
            notice_all("Hi!")
        end
    end
end

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Podes fazer doutra maneira

 

when XXXX.chat "hi" then

npc.purge()

notice_all("hi")

 

Mas tenta sem os xXx no npc.purge()

Share this post


Link to post
Share on other sites
antiblock
Cyphriun
  • 0
3 horas atrás, .тιαgσ disse:

Podes fazer doutra maneira

 

when XXXX.chat "hi" then

npc.purge()

notice_all("hi")

 

Mas tenta sem os xXx no npc.purge()

 

Nop ja tinha tentato mas tentei novamente e nop :/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this