Jump to content
  • 0
Sign in to follow this  
Alayne

Programatically trigger a specific npc event

Question

Hi peoples,

 

I'd like to programatically trigger a specific event of a specific npc.

I'm really newb to code sourcing, so if anybody can tell me how to do that, I'd be greatly thankfull ^^

 

Here's the name of the npc and event to call:

 

alapcusk for the npc unique name, and OnEventTriggered for the event!

 

I guess it should be something like "npc->event(sd, "alapcusk::OnEventTriggered", 0)", but it didn't worked...

 

Thanks!

Edited by Alayne

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Finally I've figured what failed: I simply forgot to add the npc.h include...Which bring the error when calling npc->event...My bad for all this lost time, everything's good now ^^

Share this post


Link to post
Share on other sites
  • 0

i think what you mean is "Automated" instead of programatically, try searching for automated events and you'll see their script containing timings for them to trigger. (something like OnClock, OnMinute) just get the Idea if you want to learn for yourself, or you can post the whole script of yours and request for modification making it automated.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.