Message on death

This forum is for discussing anything related to The Quest editor.

Message on death

Postby Prickett » Tue Jan 07, 2020 4:16 am

So when the final boss dies, I’d like to have a message appear on-screen. But when I put the code in, he was invincible, both in the editor, and in play testing. If anyone knows what line of code works for this, I’d really appreciate it.
Prickett
 
Posts: 648
Joined: Mon Jul 22, 2013 2:39 am
Location: Georgia, USA

Re: Message on death

Postby Elendil / Redshift » Tue Jan 07, 2020 10:59 am

When a monster script runs, the game only does what it's in it. Any normal processing (damage, dying) is skipped.

What you do when you want normal things to happen is call the "default" function. See the script for Oyo the Shaman for example:

Code: Select all
if (evtdie()) {
  message("As Oyo slumps to the ground, you notice a curious looking scroll still clutched in his hand...");
}
default();

This script is run on all events (getting hit or dying for example) but it only does something special on dying by checking if the event which kicked off the running of the script was the death event "evtdie". And in all cases it runs the default processing.
User avatar
Elendil / Redshift
Site Admin
 
Posts: 940
Joined: Sun Oct 09, 2011 11:35 am

Re: Message on death

Postby Prickett » Tue Jan 07, 2020 6:54 pm

Thank you, it’s working as desired now
Prickett
 
Posts: 648
Joined: Mon Jul 22, 2013 2:39 am
Location: Georgia, USA


Return to Editor

Who is online

Users browsing this forum: No registered users and 12 guests

cron