Alayne 99 Posted February 9, 2017 (edited) 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 February 9, 2017 by Alayne Quote Share this post Link to post Share on other sites
0 rans 7 Posted February 9, 2017 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. Quote Share this post Link to post Share on other sites
0 Alayne 99 Posted February 10, 2017 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 ^^ Quote Share this post Link to post Share on other sites
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 AlayneShare this post
Link to post
Share on other sites