Jump to content
  • 0

OnPCDieEvent keeps triggering


daikatana_

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  05/09/19
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

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;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

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
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.

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.

×
×
  • Create New...