Jump to content
  • 0

OnPCDieEvent keeps triggering


Question

Posted

Hi everybody,

I've got a script, where I need something to happen after the player dies. But that something keeps happening every time the player dies even though I put an "end;" at the end. Sure, I can put there some condition before and after "announce", but is there some more elegant way to do that?

Thanks a lot.

prt_fild01,261,360,2	script	Blah	849,{
	monster	"prt_fild01",262,361,"Assassin",1647,1;
	end;
OnPCDieEvent:
	announce "You are dead!!!!!!",4;
end;
}

 

2 answers to this question

Recommended Posts

  • 0
Posted

When do you want it to trigger though?. as right now. it will trigger everytime you dies. wherever you are..

you can simply make it like this so it will only announce on certain maps. example is prt_fild08.

OnPCDieEvent:
	if(strcharinfo(3)==prt_fild08)
		announce "You are dead!!!!!!",4;
end;

 

  • 0
Posted (edited)

The problem lies in that it still triggers.

You could also add as well a condition to only continue when the "killerrid" is the Mob ID, like this:
 

OnPCDieEvent:
if(strcharinfo(3) == prt_fild08 && killerrid == 1647)
	announce "You are dead!!!!!!",bc_self;
end;

 

Edited by llchrisll

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...