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

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

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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